Tanya Lattner
ef55b5d87a
Fix bugs section.
...
llvm-svn: 46992
2008-02-12 06:28:54 +00:00
Tanya Lattner
1c4be00c9e
Merge release notes from mainline.
...
llvm-svn: 46986
2008-02-12 05:16:42 +00:00
Tanya Lattner
06834b2734
release tag.
...
llvm-svn: 46982
2008-02-12 02:43:50 +00:00
Tanya Lattner
3e45ec8ee2
Merge from mainline.
...
Don't dump the function!
llvm-svn: 46699
2008-02-04 06:29:04 +00:00
Tanya Lattner
4149ab2eb3
Merge from mainline.
...
Provide correct DWARF register numbering for debug information emission on x86-32/Darwin.
This should fix bunch of issues.
llvm-svn: 46698
2008-02-04 06:17:46 +00:00
Tanya Lattner
23177b1ff0
Merge from mainline.
...
Trivial patch to fix two warnings
llvm-svn: 46272
2008-01-23 03:56:34 +00:00
Tanya Lattner
7ae6b34d1d
Merge from mainline.
...
One too many )'s breaks 'make clean' with certain versions of make.
This fixes PR1927
llvm-svn: 46248
2008-01-22 07:16:09 +00:00
Tanya Lattner
d18515a257
Merge from mainline.
...
Fix the failures in the PPC JIT by marking relocation entries for
external symbols (e.g. 'fmod') as needing a stub. This regression
was introduced by Evan's jit patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071231/056749.html
With this fixed, the two ExecutionEngine failures are passing on ppc,
and the ppc jit works on freebench and olden.
llvm-svn: 46225
2008-01-21 22:45:15 +00:00
Tanya Lattner
99d99dcaa2
Merge from mainline.
...
Need to handle any 'nest' parameter before integer
parameters, since otherwise it won't be passed in
the right register. With this change trampolines
work on x86-64 (thanks to Luke Guest for providing
access to an x86-64 box).
llvm-svn: 46215
2008-01-21 20:47:24 +00:00
Tanya Lattner
e41e59505e
Merge from mainline.
...
Honour ByVal parameter attribute for name decoration.
llvm-svn: 46214
2008-01-21 20:45:28 +00:00
Tanya Lattner
c1dde534b1
Merge from mainline.
...
Make sure the caller doesn't use freed memory.
Fixes PR1935.
llvm-svn: 46213
2008-01-21 20:43:02 +00:00
Tanya Lattner
a489619ead
UnXFAIL this test.
...
llvm-svn: 46169
2008-01-18 19:18:51 +00:00
Tanya Lattner
2e1232ef6f
Merge from mainline.
...
Revert the part of 45849 that treated weak globals
as weak globals rather than commons. While not wrong,
this change tickled a latent bug in Darwin's strip,
so revert it for now as a workaround.
llvm-svn: 46168
2008-01-18 19:15:06 +00:00
Tanya Lattner
f2190a5c18
Merge from mainline.
...
Revert the part of 45848 that treated weak globals
as weak globals rather than commons. While not wrong,
this change tickled a latent bug in Darwin's strip,
so revert it for now as a workaround.
llvm-svn: 46167
2008-01-18 19:13:34 +00:00
Tanya Lattner
93f7a28af9
Update for current year.
...
llvm-svn: 46121
2008-01-17 06:01:52 +00:00
Tanya Lattner
e1a9bf1233
Set version to 2.2
...
Regenerated configure with autoconf 2.60. Do not use 2.61 until AutoGen.sh is updated!
llvm-svn: 46118
2008-01-17 05:54:18 +00:00
Tanya Lattner
cf9988be1f
Creating 2.2 release branch
...
llvm-svn: 46114
2008-01-17 05:09:49 +00:00
Evan Cheng
04af661b1f
DAE bug fix. Don't lose parameter attributes on vararg arguments.
...
llvm-svn: 46113
2008-01-17 04:18:54 +00:00
Devang Patel
16808a32f4
Enable CBE
...
llvm-svn: 46112
2008-01-17 02:10:08 +00:00
Evan Cheng
54c20b559e
When a live virtual register is being clobbered by an implicit def, it is spilled
...
and the spill is its kill. However, if the local allocator has determined the
register has not been modified (possible when its value was reloaded), it would
not issue a restore. In that case, mark the last use of the virtual register as
kill.
llvm-svn: 46111
2008-01-17 02:08:17 +00:00
Fariborz Jahanian
386699515b
Computed length of a __func__ identifier used in an objective-c method correctly,
...
when creating its type.
llvm-svn: 46109
2008-01-17 01:36:09 +00:00
Chris Lattner
5630c4f217
Fix arg promotion to propagate the correct attrs on the calls to
...
promoted functions. This is important for varargs calls in
particular. Thanks to duncan for providing a great testcase.
llvm-svn: 46108
2008-01-17 01:17:03 +00:00
Seo Sanghyeon
15051b4caf
Ignore --param
...
llvm-svn: 46107
2008-01-17 01:08:43 +00:00
Ted Kremenek
e780f408b1
Added some experimental optimizations to remove dead values from the
...
state.
llvm-svn: 46106
2008-01-17 00:52:48 +00:00
Steve Naroff
1aa1941889
Declarator::clear(): Null out variable after it's been deleted.
...
This avoids a double free (which is good:-)
Bug submitted by Eli.
llvm-svn: 46105
2008-01-17 00:36:28 +00:00
Evan Cheng
dc5b4c57d7
Replace std::vector<bool> with BitVector.
...
llvm-svn: 46104
2008-01-17 00:35:26 +00:00
Steve Naroff
d8583eb993
Simplify comment.
...
llvm-svn: 46103
2008-01-16 23:56:32 +00:00
Steve Naroff
8a0abea999
Type::isArithmeticType(): disallow incomplete enum decls.
...
Bug submitted by Eli.
llvm-svn: 46102
2008-01-16 23:54:22 +00:00
Ted Kremenek
506e507508
Changed sorting criteria for DSPtr to put sub-expressions first in the value
...
map. This will allow us to quickly prune them from maps without searching the
entire map.
llvm-svn: 46101
2008-01-16 23:35:31 +00:00
Ted Kremenek
692b01b0be
Changed sorting criteria for DSPtr to sort Decl* before Expr*, and
...
to sort sub-expressions before Block-level expressions.
llvm-svn: 46100
2008-01-16 23:33:44 +00:00
Evan Cheng
7be1528004
Fixes a nasty dag combiner bug that causes a bunch of tests to fail at -O0.
...
It's not safe to use the two value CombineTo variant to combine away a dead load.
e.g.
v1, chain2 = load chain1, loc
v2, chain3 = load chain2, loc
v3 = add v2, c
Now we replace use of v1 with undef, use of chain2 with chain1.
ReplaceAllUsesWith() will iterate through uses of the first load and update operands:
v1, chain2 = load chain1, loc
v2, chain3 = load chain1, loc
v3 = add v2, c
Now the second load is the same as the first load, SelectionDAG cse will ensure
the use of second load is replaced with the first load.
v1, chain2 = load chain1, loc
v3 = add v1, c
Then v1 is replaced with undef and bad things happen.
llvm-svn: 46099
2008-01-16 23:11:54 +00:00
Duncan Sands
32b0ff6814
Trampoline support for x86-64. This looks like
...
it should work, but I have no machine to test
it on. Committed because it will at least
cause no harm, and maybe someone can test it
for me!
llvm-svn: 46098
2008-01-16 22:55:25 +00:00
Ted Kremenek
a14396d51d
IntegerLiterals are no longer evaluated to create separate nodes; their
...
values are determined when evaluating the parent expression.
llvm-svn: 46096
2008-01-16 22:28:08 +00:00
Ted Kremenek
493444fc19
Fixed bug where we performed addition instead of subtraction during
...
constant propagation.
llvm-svn: 46095
2008-01-16 22:20:36 +00:00
Ted Kremenek
e914bb8183
Fixed iterator bug in ExplodedNodeImpl::NodeGroup::end(); we would improperly
...
handle the case where the number of nodes was 0.
Fixed bug in GREngineImpl where we did not proceed to the next statement
when processing a PostStmt location.
llvm-svn: 46093
2008-01-16 22:13:19 +00:00
Ted Kremenek
ac886cb835
Added initial graph visualization support for the GRConstants analysis.
...
llvm-svn: 46092
2008-01-16 21:46:15 +00:00
Ted Kremenek
873bbd53a4
Fixed invalid typedefs in the root and eop iterators for ExplodedGraph.
...
llvm-svn: 46091
2008-01-16 21:45:54 +00:00
Chris Lattner
39f156183d
Handle attribute(used) global variables that are i8.
...
llvm-svn: 46090
2008-01-16 21:35:43 +00:00
Dale Johannesen
ed20366706
Do not mark EH tables no-dead-strip unless the
...
associated function is so marked.
llvm-svn: 46088
2008-01-16 19:59:28 +00:00
Ted Kremenek
88d5909bed
Added support from retrieving stored values to variables.
...
llvm-svn: 46087
2008-01-16 19:47:19 +00:00
Ted Kremenek
47b62c1a5f
Added support for assignments in GRConstants.
...
llvm-svn: 46086
2008-01-16 19:42:59 +00:00
Ted Kremenek
7e7070b594
Fixed bug where GRConstants::AddBindings() did not check for values
...
that were "not a constant."
llvm-svn: 46085
2008-01-16 19:28:16 +00:00
Ted Kremenek
deac51943a
Fixed bug in cleanup of nodes in ExplodedNodeImpl where we should directly
...
call the dstor instead of using delete.
llvm-svn: 46084
2008-01-16 19:27:42 +00:00
Chris Lattner
a65e1f3b31
Move promoteExprToType from being a static method in SemaExpr.cpp to being
...
a method named ImpCastExprToType in Sema.
Use this method to insert implicit casts for case statements from their
operand type to the condition type of the switch. This fixes a crash on
test/CodeGen/statements.c, reported by Eli Friedman.
llvm-svn: 46083
2008-01-16 19:17:22 +00:00
Chris Lattner
45b985c664
add accessors to switchstmt.
...
llvm-svn: 46082
2008-01-16 19:16:00 +00:00
Ted Kremenek
334139f58e
Fixed broken bitmasking in the ctor of ProgramPoint.
...
llvm-svn: 46081
2008-01-16 19:11:06 +00:00
Ted Kremenek
29a9d00a56
Added missing call to the checker's Initialize() method in the alternate
...
ctor for GREngine.
llvm-svn: 46080
2008-01-16 18:59:52 +00:00
Ted Kremenek
34eb8bb3bd
Added missing ctor to ExplodedGraph.
...
llvm-svn: 46079
2008-01-16 18:59:09 +00:00
Ted Kremenek
f81d2c9a06
Fixed incorrect pointer mask.
...
llvm-svn: 46078
2008-01-16 18:58:48 +00:00
Ted Kremenek
db0b651de9
Shortened driver option for running the GR-constants analysis to --grconstants.
...
llvm-svn: 46076
2008-01-16 18:21:49 +00:00
Ted Kremenek
7773c4fafd
Add missing header file for GRConstants analysis.
...
llvm-svn: 46075
2008-01-16 18:19:20 +00:00
Ted Kremenek
2e12c2e790
Hooked up the GRConstants analysis to the driver.
...
Fixed some compilation errors with GREngine that showed up during
template instantiation.
llvm-svn: 46074
2008-01-16 18:18:48 +00:00
Chris Lattner
aebbe4700a
add testcase for regression
...
llvm-svn: 46073
2008-01-16 18:03:52 +00:00
Chris Lattner
52188501f6
Fix a ppc long double regression I introduced yesterday due to a
...
simplification. This fixes automotive-basicmath on PPC.
llvm-svn: 46072
2008-01-16 17:59:31 +00:00
Ted Kremenek
2d700ed2ba
More cleanups in DoStmt. The NodeSets are now vectors instead of sets, since
...
node caching in GREngine will guarantee that we do not insert a node twice into
a nodeset.
llvm-svn: 46071
2008-01-16 17:56:25 +00:00
Steve Naroff
17832a48f8
Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function declarations/definitions). Patch by Carl Lewis!
...
llvm-svn: 46070
2008-01-16 15:01:34 +00:00
Chris Lattner
7ca4d5b1f3
merge a few pieces of code that do the store/load to stack
...
pattern to use EmitStackConvert now.
llvm-svn: 46066
2008-01-16 07:51:34 +00:00
Chris Lattner
87bc3e7ece
rename ExpandBIT_CONVERT to EmitStackConvert, generalizing
...
it to allow it to emit different load and store kinds.
llvm-svn: 46065
2008-01-16 07:45:30 +00:00
Chris Lattner
a2c7ff3386
simplify a bunch of code by using SelectionDAG::CreateStackTemporary
...
instead of inlining its body.
llvm-svn: 46062
2008-01-16 07:03:22 +00:00
Chris Lattner
91d86242f9
Change legalizeop of FP_ROUND and FP_EXTEND to not fall through
...
into the ANY_EXTEND/ZERO_EXTEND/SIGN_EXTEND code to simplify it.
Unmerge the code for FP_ROUND and FP_EXTEND from each other to
make each one simpler.
llvm-svn: 46061
2008-01-16 06:57:07 +00:00
Chris Lattner
6e3379c07b
make sure to use a cpu that has sse.
...
llvm-svn: 46060
2008-01-16 06:32:02 +00:00
Chris Lattner
e8bb9f2190
make it more clear that this predicate only applies to scalar FP types.
...
llvm-svn: 46058
2008-01-16 06:24:21 +00:00
Chris Lattner
14e616ef0b
introduce a isTypeInSSEReg predicate, which allows us to simplify
...
some code. No functionality change.
llvm-svn: 46055
2008-01-16 06:19:45 +00:00
Chris Lattner
8f7cec859e
My previous commit had an incomplete message, it should have been:
...
make the 'fp return in ST(0)' optimization smart enough to
look through token factor nodes. THis allows us to compile
testcases like CodeGen/X86/fp-stack-retcopy.ll into:
_carg:
subl $12, %esp
call L_foo$stub
fstpl (%esp)
fldl (%esp)
addl $12, %esp
ret
instead of:
_carg:
subl $28, %esp
call L_foo$stub
fstpl 16(%esp)
movsd 16(%esp), %xmm0
movsd %xmm0, 8(%esp)
fldl 8(%esp)
addl $28, %esp
ret
Still not optimal, but much better and this is a trivial patch. Fixing
the rest requires invasive surgery that is is not llvm 2.2 material.
llvm-svn: 46054
2008-01-16 05:56:59 +00:00
Chris Lattner
ea001f1db7
make the 'fp return in ST(0)' optimization smart enough to
...
look through token factor
llvm-svn: 46053
2008-01-16 05:53:06 +00:00
Chris Lattner
de5c74f18e
various whitespace cleanups, no functionality change.
...
llvm-svn: 46052
2008-01-16 05:52:18 +00:00
Ted Kremenek
73e5f2bb17
Adjusted DSPtr::Profile method again, since my last patch broke the build.
...
llvm-svn: 46051
2008-01-16 05:51:13 +00:00
Chris Lattner
2e50a6f90f
Factor the ReachesChainWithoutSideEffects out of dag combiner into
...
a public SDOperand::reachesChainWithoutSideEffects method. No
functionality change.
llvm-svn: 46050
2008-01-16 05:49:24 +00:00
Ted Kremenek
29185f17e9
Changed 'Profile' method for DSPtr to incorporate the flags from the
...
variant type, and not just the pointer value.
llvm-svn: 46049
2008-01-16 05:49:09 +00:00
Devang Patel
b3696e4f14
Do not strip llvm.used values.
...
llvm-svn: 46045
2008-01-16 03:33:05 +00:00
Ted Kremenek
fb55354fc9
Renamed some internal classes for the GR-Constant Propagation analysis.
...
Cleaned up GRConstants::AddBinding to not directly reference the
predecessor node. Now we just manipulate the current state, and a driver
function creates nodes as needed.
llvm-svn: 46040
2008-01-16 00:53:15 +00:00
Fariborz Jahanian
19d42bf0a5
Typo.
...
llvm-svn: 46038
2008-01-16 00:09:11 +00:00
Fariborz Jahanian
b860cbf052
Added support for rewriting of continue/break statements inside ObjC2's foreach-stmt.
...
llvm-svn: 46037
2008-01-15 23:58:23 +00:00
Ted Kremenek
de8d62b132
Added skeleton implementation of new constant-prop. analysis using
...
the graph reachability engine.
llvm-svn: 46036
2008-01-15 23:55:06 +00:00
Ted Kremenek
03bc2afa65
Added ctor to GRNodeBuilder.
...
llvm-svn: 46035
2008-01-15 23:54:22 +00:00
Ted Kremenek
7ea05687be
Changed ImmutableMap::find to return an iterator instead of a pointer
...
to the tree node.
llvm-svn: 46034
2008-01-15 23:53:53 +00:00
Devang Patel
41f375a45c
- Introduces versioning macro LLVM_LTO_VERSION
...
- Communicate symbol visibility
- Communicate code generation model
llvm-svn: 46033
2008-01-15 23:52:34 +00:00
Chris Lattner
5047536879
Commit a piece that I missed before, patch by Alain Frisch
...
llvm-svn: 46032
2008-01-15 23:27:40 +00:00
Dale Johannesen
00dfb551cc
Missed file from previous checkin.
...
llvm-svn: 46030
2008-01-15 23:25:27 +00:00
Dale Johannesen
59a2250b0d
Fix and enable EH for x86-64 Darwin. Adds
...
ShortenEHDataFor64Bits as a not-very-accurate
abstraction to cover all the changes in DwarfWriter.
Some cosmetic changes to Darwin assembly code for
gcc testsuite compatibility.
llvm-svn: 46029
2008-01-15 23:24:56 +00:00
Owen Anderson
897aed9109
Move some calls to getVRegDef higher in the callgraph, so they don't get executed as frequently in performance sensitive code.
...
llvm-svn: 46027
2008-01-15 22:58:11 +00:00
Chris Lattner
cc7ff8c1dd
improve compatibility with mingw, patch by Alain Frisch
...
llvm-svn: 46026
2008-01-15 22:50:50 +00:00
Chris Lattner
f3e1155c41
add a test to ensure that argpromote of one argument doesn't
...
break the byval attr on some other argument.
llvm-svn: 46025
2008-01-15 22:38:12 +00:00
Anton Korobeynikov
06cbb65cb0
Add description of 'llvm.trap' intrinsic. Also, minor fixes in formatting.
...
llvm-svn: 46024
2008-01-15 22:31:34 +00:00
Chris Lattner
915ec14073
verify x86 generates ud2 for llvm.trap
...
llvm-svn: 46023
2008-01-15 22:22:02 +00:00
Steve Naroff
abefc391dd
Finish up handling all permutations of "complex int" (in Sema::UsualArithmeticConversions()).
...
A FIXME remains to verify the conversion rules are consistent with GCC.
Thanks to Eli for the new/improved test case...
llvm-svn: 46022
2008-01-15 22:21:49 +00:00
Evan Cheng
51a09143c2
Unbreak the build.
...
llvm-svn: 46021
2008-01-15 22:19:35 +00:00
Chris Lattner
50baecd31e
new testcase for llvm.trap.
...
llvm-svn: 46020
2008-01-15 22:17:26 +00:00
Chris Lattner
8e07533f20
If someone wants to implement ppc TRAP, they can go for it :)
...
llvm-svn: 46019
2008-01-15 22:15:02 +00:00
Chris Lattner
ec224888a6
The type of the 'abort' node should be pointer type (because
...
it's a function pointer) not MVT::Other. This fixes builtin_trap
lowering on ppc, alpha, ia64
llvm-svn: 46018
2008-01-15 22:09:33 +00:00
Chris Lattner
9a249b0ce5
rename SDTRet -> SDTNone.
...
Move definition of 'trap' sdnode up from x86 instrinfo to targetselectiondag.td.
llvm-svn: 46017
2008-01-15 22:02:54 +00:00
Owen Anderson
1ba66e0cec
Remove DefInst from LiveVariables::VarInfo. Use the facilities on MachineRegisterInfo instead.
...
llvm-svn: 46016
2008-01-15 22:02:46 +00:00
Chris Lattner
3c3fefde06
no need to expand ISD::TRAP to X86ISD::TRAP, just match ISD::TRAP.
...
llvm-svn: 46015
2008-01-15 21:58:22 +00:00
Chris Lattner
ee8df1f4d3
Add support for targets that have a legal ISD::TRAP.
...
llvm-svn: 46014
2008-01-15 21:58:08 +00:00
Chuck Rose III
fe2714fab3
Add files to windows project files. Also include <algorithm> explicitly so that vstudio build works
...
llvm-svn: 46013
2008-01-15 21:43:17 +00:00
Anton Korobeynikov
59e6d533bd
Fix JIT encoding of trap/ud2 instruction
...
llvm-svn: 46012
2008-01-15 21:40:02 +00:00
Bill Wendling
d21d90cf98
Reformatted. It was confusing the other way. No functionality change.
...
llvm-svn: 46009
2008-01-15 21:16:32 +00:00
Gordon Henriksen
1390ef4163
Fix a memory correctness error noticed by valgrind (harmless in practice).
...
Thanks to Duncan Sands for noticing it.
llvm-svn: 46007
2008-01-15 20:02:11 +00:00
Duncan Sands
60bd71603b
Testcase for gimplify_expr crash caused by an
...
unexpected placeholder_expr.
llvm-svn: 46006
2008-01-15 19:55:41 +00:00
Steve Naroff
6fcfd0581d
- Change Type::isComplexType() to exlude GCC's complex integer extension. In general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec).
...
- Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType().
This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite).
llvm-svn: 46005
2008-01-15 19:36:10 +00:00
Evan Cheng
4f7437f8af
Oops. Forgot to commit this.
...
llvm-svn: 46003
2008-01-15 07:49:54 +00:00
Evan Cheng
eb30bb7d29
Oops. Forgot to commit this.
...
llvm-svn: 46002
2008-01-15 07:49:36 +00:00
Anton Korobeynikov
6bbbc4cbfa
For PR1839: add initial support for __builtin_trap. llvm-gcc part is missed
...
as well as PPC codegen
llvm-svn: 46001
2008-01-15 07:02:33 +00:00
Chris Lattner
15346fae70
avoid pasting L + "foo" into L"foo".
...
llvm-svn: 46000
2008-01-15 05:22:14 +00:00
Chris Lattner
877ca77420
avoid token pasting between identifiers and wide strings:
...
abc+L"foo" -> abc L"foo", not abcL"foo"
llvm-svn: 45999
2008-01-15 05:14:19 +00:00
Chris Lattner
352ab9b4a2
clarify that byval is valid for any pointer argument.
...
llvm-svn: 45998
2008-01-15 04:34:22 +00:00
Evan Cheng
4d70ba3134
Rename CCIfStruct to CCIfByVal and CCStructAssign to CCPassByVal. Remove unused parameters of CCStructAssign and add size and alignment requirement info.
...
llvm-svn: 45997
2008-01-15 03:34:58 +00:00
Evan Cheng
48bdfe63e2
Both x86-32 and x86-64 handle byval parameter attributes.
...
llvm-svn: 45996
2008-01-15 03:15:41 +00:00
Evan Cheng
5b212ea818
ByVal stack slot alignment should be at least as large as pointer ABI alignment.
...
llvm-svn: 45995
2008-01-15 03:14:05 +00:00
Evan Cheng
a9ecdf6927
Revert my last commit. Not needed.
...
llvm-svn: 45994
2008-01-15 03:10:35 +00:00
Steve Naroff
8115902d6c
Add a comment...
...
llvm-svn: 45993
2008-01-15 02:05:07 +00:00
Steve Naroff
7f988889ef
Rework commit r45976, which was incorrect.
...
- Add Type::isComplexIntegerType(), Type::getAsComplexIntegerType().
- Don't inlude complex types with Type::isIntegerType(), which is too general.
- Use the new predicates in Sema::UsualArithmeticConversions() to recognize/convert the types.
llvm-svn: 45992
2008-01-15 01:41:59 +00:00
Ted Kremenek
e584359716
Removed implicit transitions to a "BlockExit" location; we now handle
...
the end of the block by processing empty blocks (at BlockEntrance) or
when we have just processed the last statement in a block (at PostStmt).
llvm-svn: 45991
2008-01-15 00:24:08 +00:00
Ted Kremenek
619bd1a8a0
Removed mutation of CFGBlock through operator[]. For now the underlying ASTs,
...
however, can still be manipulated through the returned Stmt*.
llvm-svn: 45990
2008-01-15 00:18:01 +00:00
Steve Naroff
d8c7d484af
Make sure Sema::GetTypeForDeclarator() deals with abstract declarators when diagnosing incorrect code.
...
Bug submitted by Eli.
llvm-svn: 45989
2008-01-14 23:33:18 +00:00
Ted Kremenek
3e743661c5
Added prototype implementation of path-sens. analysis core engine.
...
llvm-svn: 45986
2008-01-14 23:24:37 +00:00
Ted Kremenek
50fd838140
Added operator[] for CFGBlock. This provides random access to the statements
...
of a block.
llvm-svn: 45984
2008-01-14 23:18:55 +00:00
Chris Lattner
49f980c334
Fix build issue on cygwin, patch by Sam Bishop
...
llvm-svn: 45977
2008-01-14 21:47:29 +00:00
Steve Naroff
c28f46c6b4
Teach Type::isIntegerType() about GCC's __complex__ integer extensions...
...
Bug submitted by Eli.
llvm-svn: 45976
2008-01-14 21:38:57 +00:00
Steve Naroff
012484d6c8
Fix crasher when redefining functions. Not 100% pleased with this solution, but it is clearly an improvement. Will discuss with Chris later.
...
llvm-svn: 45975
2008-01-14 20:51:29 +00:00
Duncan Sands
38987c1dcc
Simplify CallInst::hasByValArgument using a new method.
...
llvm-svn: 45974
2008-01-14 19:57:00 +00:00
Duncan Sands
b5ca2e9fcb
I noticed that the trampoline straightening transformation could
...
drop attributes on varargs call arguments. Also, it could generate
invalid IR if the transformed call already had the 'nest' attribute
somewhere (this can never happen for code coming from llvm-gcc,
but it's a theoretical possibility). Fix both problems.
llvm-svn: 45973
2008-01-14 19:52:09 +00:00
Chris Lattner
994718417a
don't create the post-ra scheduler unless it is enabled.
...
llvm-svn: 45972
2008-01-14 19:00:06 +00:00
Chris Lattner
4272c12571
remove dead #include
...
llvm-svn: 45971
2008-01-14 18:45:28 +00:00
Ted Kremenek
cb994b6a72
Cleaned up comment.
...
llvm-svn: 45970
2008-01-14 18:42:38 +00:00
Ted Kremenek
94acc6ac9a
Cleaned up comment.
...
llvm-svn: 45969
2008-01-14 18:41:42 +00:00
Ted Kremenek
a018a2c0f4
When serializing CompoundLiteralExpr, serialize out the file scope flag before
...
serializing the subexpression (Init), as this results in a more efficient
encoding in the bitstream.
llvm-svn: 45967
2008-01-14 18:29:39 +00:00
Steve Naroff
d32419de0d
Record if a compound literal expression is @ file scope. This allows us to implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable.
...
Bug/patch by Eli Friedman!
llvm-svn: 45966
2008-01-14 18:19:28 +00:00
Ted Kremenek
d065a790d9
Removed 'inline' keywords from methods now defined in ExplodedGraph.cpp.
...
llvm-svn: 45965
2008-01-14 18:11:35 +00:00
Evan Cheng
c8dc2f781f
Need a space to separate Make options.
...
llvm-svn: 45964
2008-01-14 17:58:03 +00:00
Ted Kremenek
a0a3e9bb07
Change uses of std::cerr/std::cout to llvm::Lcerr/llvm::cout, and remove
...
#include<iostream>.
Patch provided by Sam Bishop.
llvm-svn: 45962
2008-01-14 16:44:48 +00:00
Steve Naroff
4871fe0b8f
Revert r45951, Chris says it violates the C99 spec.
...
llvm-svn: 45961
2008-01-14 16:10:57 +00:00
Duncan Sands
ae8c041b85
This test is now the same as byval-1.ll, so remove it.
...
llvm-svn: 45960
2008-01-14 14:57:30 +00:00
Duncan Sands
4e079479bb
Test that byval cannot be used with pointers to
...
types with no size.
llvm-svn: 45959
2008-01-14 14:55:05 +00:00
Anders Carlsson
a1afcab6f9
_asm is another valid alias for asm.
...
llvm-svn: 45957
2008-01-14 07:46:40 +00:00
Duncan Sands
1f5340c023
We now allow byval on fairly general pointer types.
...
llvm-svn: 45956
2008-01-14 06:53:45 +00:00
Chris Lattner
3c43efc9d1
Improve the FP stackifier to decide all on its own whether
...
an instruction kills a register or not. This is cheap and
easy to do now that instructions record this on their flags,
and this eliminates the second pass of LiveVariables from the
x86 backend. This speeds up a release llc by ~2.5%.
llvm-svn: 45955
2008-01-14 06:41:29 +00:00
Anders Carlsson
1ba25ca171
Add codegen upport for implicit casts to aggregate exprs.
...
llvm-svn: 45954
2008-01-14 06:28:57 +00:00
Chris Lattner
f14ba63620
add a note
...
llvm-svn: 45953
2008-01-14 06:27:57 +00:00
Chris Lattner
fd65291aa3
Fix ASTContext::typesAreCompatible when analyzing a function type with
...
proto and function type without proto. It would never call
'functionTypesAreCompatible' because they have different type classes.
llvm-svn: 45952
2008-01-14 05:45:46 +00:00
Steve Naroff
090353191c
Rewrite Expr::isNullPointerConstant() to deal with multiple levels of explicit casts.
...
Now, isNullPointerConstant() will return true for the following: "(void*)(double*)0"
llvm-svn: 45951
2008-01-14 02:53:34 +00:00
Evan Cheng
b9293c51bd
Simplify code.
...
llvm-svn: 45950
2008-01-14 02:38:45 +00:00
Chris Lattner
26fe7ebc03
Fix the miscompilation of MiBench/consumer-lame that was exposed by Evan's
...
byval work. This miscompilation is due to the program indexing an array out
of range and us doing a transformation that broke this.
llvm-svn: 45949
2008-01-14 02:09:12 +00:00
Chris Lattner
9a6db18b04
The isNotSuitableForSRA property is now dead, don't compute it.
...
llvm-svn: 45948
2008-01-14 01:32:52 +00:00
Chris Lattner
ab0537258f
Change SRAGlobal to not depend on isNotSuitableForSRA, which makes it very
...
difficult to understand the invariants.
llvm-svn: 45947
2008-01-14 01:31:05 +00:00
Chris Lattner
20bbac3435
Make the 'shrink global to bool' optimization more self contained, and thus
...
easier to show that its safe. No functionality change.
llvm-svn: 45946
2008-01-14 01:17:44 +00:00
Chris Lattner
92bd785323
Turn a memcpy from a double* into a load/store of double instead of
...
a load/store of i64. The later prevents promotion/scalarrepl of the
source and dest in many cases.
This fixes the 300% performance regression of the byval stuff on
stepanov_v1p2.
llvm-svn: 45945
2008-01-14 00:28:35 +00:00
Chris Lattner
57974c8d51
factor memcpy/memmove simplification out to its own SimplifyMemTransfer
...
method, no functionality change.
llvm-svn: 45944
2008-01-13 23:50:23 +00:00
Chris Lattner
8c5cdddfb9
simplify some code. If we can infer alignment for source and dest that are
...
greater than memcpy alignment, and if we lower to load/store, use the best
alignment info we have.
llvm-svn: 45943
2008-01-13 22:30:28 +00:00
Chris Lattner
5a86612d3f
simplify some code by adding a InsertBitCastBefore method,
...
make memmove->memcpy conversion a bit simpler.
llvm-svn: 45942
2008-01-13 22:23:22 +00:00
Duncan Sands
51fe7bbcf5
Whitespace tweak.
...
llvm-svn: 45940
2008-01-13 21:20:29 +00:00
Duncan Sands
08c728b519
Remove the assumption that byval has been applied to
...
a pointer to a struct.
llvm-svn: 45939
2008-01-13 21:19:59 +00:00
Duncan Sands
2796740ad6
Allow the byval attribute for pointers to any type with
...
a size, not just structs.
llvm-svn: 45938
2008-01-13 21:19:12 +00:00
Chris Lattner
5bc253c8f2
Fix PR1907, a nasty miscompilation because instcombine didn't
...
realize that ne & sgt was a signed comparison (it was only
looking at whether the left compare was signed).
llvm-svn: 45937
2008-01-13 20:59:02 +00:00
Duncan Sands
93ebe1df27
Check that nested functions don't get pointless
...
static chains.
llvm-svn: 45936
2008-01-13 18:44:12 +00:00
Steve Naroff
826e91ae04
Change Sema::CheckAddressOfOperation() to respect C99-only addressof rules.
...
Remove diagnostics from Sema::CheckIndirectionOperand(). C89/C99 allow dereferencing an incomplete type. clang appears to be emulating some incorrect gcc behavior (see below).
void
foo (void)
{
struct b;
struct b* x = 0;
struct b* y = &*x; // gcc produces an error ("dereferencing pointer to incomplete type")
}
With this patch, the above is now allowed.
Bug/Patch by Eli Friedman!
llvm-svn: 45933
2008-01-13 17:10:08 +00:00
Duncan Sands
ff70c5de69
Small simplification.
...
llvm-svn: 45932
2008-01-13 08:12:17 +00:00
Duncan Sands
781f6549db
When turning a call to a bitcast function into a direct call,
...
if this becomes a varargs call then deal correctly with any
parameter attributes on the newly vararg call arguments.
llvm-svn: 45931
2008-01-13 08:02:44 +00:00
Ted Kremenek
d122bbdb06
Moved destructor logic of templated class ExplodedGraph to non-templated
...
parent class ExplodedGraphImpl.
llvm-svn: 45930
2008-01-13 05:33:04 +00:00
Ted Kremenek
6d7aee6edd
Added node cleanup to dstor of ExplodedGraph.
...
llvm-svn: 45929
2008-01-13 05:03:01 +00:00
Ted Kremenek
eb370bc386
Created ExplodedGraph.cpp and moved most method implementations of
...
ExplodedNodeImpl::NodeGroup from being defined inline to being defined
"out-of-line" in ExplodedGraph.cpp. This removes a dependence on including
<vector> in ExplodedGraph.h, and will hopefully result in smaller generated code
with negligible performance impact.
llvm-svn: 45928
2008-01-13 04:56:13 +00:00
Ted Kremenek
49bbee0b1d
Moved 'ExplodedNodeGroup' into class 'ExplodedNode' as the nested class
...
'NodeGroup.'
llvm-svn: 45927
2008-01-13 04:20:10 +00:00
Ted Kremenek
39dfeadd93
Fixed lines preventing compilation.
...
llvm-svn: 45926
2008-01-13 04:18:40 +00:00
Ted Kremenek
2ae51a5d27
Now include "CFG.h" because the inline methods of "BlockEntrance" accessor
...
the methods of CFGBlock.
llvm-svn: 45925
2008-01-13 04:08:45 +00:00
Ted Kremenek
990d7d5205
Fixed some comments.
...
llvm-svn: 45924
2008-01-13 04:03:38 +00:00
Ted Kremenek
76245f3ed0
Removed ExplodedNode.h, since its contents are now in ExplodedGraph.h
...
llvm-svn: 45923
2008-01-13 04:00:44 +00:00
Ted Kremenek
8f13ec74c4
Merged ExplodedNode.h into ExplodedGraph.h, since the ExplodedNode class will
...
only be used in the context of the ExplodedGraph class.
llvm-svn: 45922
2008-01-13 04:00:16 +00:00
Ted Kremenek
cfe8235fa1
Changed implementation of successor and predecessor sets for ExplodedNode
...
to optimize for the common case of having a single predecessor and a single
successor.
llvm-svn: 45921
2008-01-13 03:55:50 +00:00
Chris Lattner
0d815f8f21
new testcase for rdar://5685492
...
llvm-svn: 45918
2008-01-13 00:19:57 +00:00
Chris Lattner
ca7faf6faa
improve cygwin compatibility, patch by Sam Bishop
...
llvm-svn: 45917
2008-01-12 22:54:07 +00:00
Chris Lattner
0a8c2325fc
allow __func__ in objc methods.
...
llvm-svn: 45915
2008-01-12 19:32:28 +00:00
Chris Lattner
afb514a7b4
clarify a note
...
llvm-svn: 45914
2008-01-12 18:58:46 +00:00
Evan Cheng
09dde6001d
Add hasByValArgument() to test if a call instruction has byval argument(s).
...
llvm-svn: 45913
2008-01-12 18:57:32 +00:00
Chris Lattner
4f6c81ac68
we don't have to make an explicit copy of a byval argument when
...
inlining a function if we know that the function does not write
to *any* memory. This implements test/Transforms/Inline/byval2.ll
llvm-svn: 45912
2008-01-12 18:54:29 +00:00
Evan Cheng
f755ff7be3
Indirect call with byval parameter requires a cast first.
...
llvm-svn: 45911
2008-01-12 18:53:07 +00:00
Chris Lattner
317e6ba07f
Tighten up handling of __func__ and friends: it should be an array
...
of const char, and it should error if it occurs outside a function.
Is it valid in an objc method? If so we should handle that too.
llvm-svn: 45910
2008-01-12 18:39:25 +00:00
Duncan Sands
0009c44464
Be more liberal in what parameter attributes are
...
allowed on the vararg arguments of a call.
llvm-svn: 45909
2008-01-12 16:42:01 +00:00
Chris Lattner
a81a0279cc
Fix the type of predefined identifiers like __func__. Patch by
...
Eli Friedman!
llvm-svn: 45906
2008-01-12 08:14:25 +00:00
Chris Lattner
65531e8fb7
Fix a fixme, by only parsing extern "C" in C++ mode.
...
llvm-svn: 45905
2008-01-12 07:08:43 +00:00
Chris Lattner
38376f1595
Add first pieces of support for parsing and representing
...
extern "C" in C++ mode. Patch by Mike Stump!
llvm-svn: 45904
2008-01-12 07:05:38 +00:00
Chris Lattner
22ad7abdfe
Allow clients to specify the inline threshold when creating
...
the inliner pass. Patch by Robert Zeh.
llvm-svn: 45903
2008-01-12 06:49:13 +00:00
Chris Lattner
459dc52df4
Add support for NetBSD, patch by Krister Walfridsson!
...
llvm-svn: 45902
2008-01-12 06:46:09 +00:00
Chris Lattner
177977ac19
When forming the squigly underline for a diagnostic, make sure to
...
verify that the source range corresponds to the current file, not
just the current line. This allows us to emit:
a.c:1:44: error: invalid operands to binary expression ('double' and 'int *')
double a; int *b; void f(void) { int c = a +
~ ^
instead of:
a.c:1:44: error: invalid operands to binary expression ('double' and 'int *')
double a; int *b; void f(void) { int c = a +
~ ~ ^
for PR1906 (note the leading ~).
Thanks to Neil for noticing this.
llvm-svn: 45901
2008-01-12 06:43:35 +00:00
Evan Cheng
0395fd76cf
Add -disable-lto optimization.
...
llvm-svn: 45900
2008-01-12 04:27:18 +00:00
Chris Lattner
ca2af72c7b
this actually does pass with 4.0
...
llvm-svn: 45899
2008-01-12 01:45:22 +00:00
Evan Cheng
7411b510b2
Code clean up.
...
llvm-svn: 45898
2008-01-12 01:08:07 +00:00
Evan Cheng
02e78103ab
ByVal arguments are passed on stack. Make sure to allocate a slot using size and alignment information on the parameter attribute.
...
llvm-svn: 45897
2008-01-12 01:07:41 +00:00
Chris Lattner
18df33d0c8
fix a wordo that gordon noticed :)
...
llvm-svn: 45896
2008-01-12 00:53:16 +00:00
Chris Lattner
6da61c2515
Any x86 instruction that reads from an invariant location is invariant.
...
This allows us to sink things like:
cvtsi2sd 32(%esp), %xmm1
when reading from the argument area, for example.
llvm-svn: 45895
2008-01-12 00:35:08 +00:00
Chris Lattner
08af5a9dad
implement support for sinking a load out the bottom of a block that
...
has no stores between the load and the end of block. This works
great and sinks hundreds of stores, but we can't turn it on because
machineinstrs don't have volatility information and we don't want to
sink volatile stores :(
llvm-svn: 45894
2008-01-12 00:17:41 +00:00
Chris Lattner
1f503ddab5
remove some incorrect classof's.
...
llvm-svn: 45893
2008-01-11 23:25:16 +00:00
Duncan Sands
5b721fc21d
When DAE drops the varargs part of a function, ensure any
...
attributes on the vararg call arguments are also dropped.
llvm-svn: 45892
2008-01-11 23:13:45 +00:00
Evan Cheng
b51d228e79
More cbe byval fixes.
...
llvm-svn: 45891
2008-01-11 23:10:11 +00:00
Chris Lattner
5a3deb99b3
llvm-g++ 4.0 has completely different code for this warning,
...
just xfail it.
llvm-svn: 45890
2008-01-11 23:06:56 +00:00
Chris Lattner
031f5e1b8c
new testcase
...
llvm-svn: 45888
2008-01-11 23:04:14 +00:00
Duncan Sands
b99f44aa5e
Do not allow attributes beyond a function's last
...
parameter, even if it is a varargs function. Do
allow attributes on the varargs part of a call,
but not beyond the last argument. Only allow
selected attributes to be on the varargs part of
a call (currently only 'byval' is allowed). The
reasoning here is that most attributes, eg inreg,
simply make no sense here.
llvm-svn: 45887
2008-01-11 22:36:48 +00:00
Chris Lattner
b5bd924e83
Teach argpromote to ruthlessly hack small byval structs when it can
...
get away with it, which exposes opportunities to eliminate the memory
objects entirely. For example, we now compile byval.ll to:
define internal void @f1(i32 %b.0, i64 %b.1) {
entry:
%tmp2 = add i32 %b.0, 1 ; <i32> [#uses=0]
ret void
}
define i32 @main() nounwind {
entry:
call void @f1( i32 1, i64 2 )
ret i32 0
}
This seems like it would trigger a lot for code that passes around small
structs (e.g. SDOperand's or _Complex)...
llvm-svn: 45886
2008-01-11 22:31:41 +00:00
Duncan Sands
0ebaf91f48
Two occurrences on one line count as one...
...
llvm-svn: 45885
2008-01-11 21:46:24 +00:00
Duncan Sands
7e46c50c6a
If there are attributes on the varargs part of a
...
call, don't discard them.
llvm-svn: 45884
2008-01-11 21:23:39 +00:00
Scott Michel
a8f67e04bd
More CellSPU refinements:
...
- struct_2.ll: Completely unaligned load/store testing
- call_indirect.ll, struct_1.ll: Add test lines to exercise
X-form [$reg($reg)] addressing
At this point, loads and stores should be under control (he says
in an optimistic tone of voice.)
llvm-svn: 45882
2008-01-11 21:01:19 +00:00
Dale Johannesen
04b99780cf
Disable for now.
...
llvm-svn: 45881
2008-01-11 20:47:33 +00:00
Ted Kremenek
8d71e25590
Fix misspelling of "existent".
...
Do not use std::cerr; use llvm::cerr instead.
Patch provided by Sam Bishop!
llvm-svn: 45880
2008-01-11 20:42:05 +00:00
Chris Lattner
b66fbdde42
Use smallptrset instead of std::set for efficiency.
...
llvm-svn: 45878
2008-01-11 19:36:30 +00:00
Chris Lattner
4a70261f00
a byval argument is guaranteed to be valid to load.
...
llvm-svn: 45877
2008-01-11 19:34:32 +00:00
Chris Lattner
4062a625e5
Update this code to use eraseFromParent where possible. Compute
...
whether an argument is byval and pass into isSafeToPromoteArgument.
llvm-svn: 45876
2008-01-11 19:20:39 +00:00
Chris Lattner
e736e55d3c
replace a loop with a constant time check.
...
llvm-svn: 45875
2008-01-11 18:55:10 +00:00
Chris Lattner
669e7054ca
another minor datastructure tweak.
...
llvm-svn: 45874
2008-01-11 18:47:45 +00:00
Chris Lattner
a8ba28f6e4
start using smallvector to avoid vector heap thrashing.
...
llvm-svn: 45873
2008-01-11 18:43:58 +00:00
Chris Lattner
c70ed4ba5b
add operator==/!= to smallvector.
...
llvm-svn: 45872
2008-01-11 18:42:02 +00:00
Chris Lattner
596875118c
rename MachineInstr::setInstrDescriptor -> setDesc
...
llvm-svn: 45871
2008-01-11 18:10:50 +00:00
Chris Lattner
806dd0e2ac
remove xchg and shift-reg-by-1 instructions, which are dead.
...
llvm-svn: 45870
2008-01-11 18:00:50 +00:00
Chris Lattner
ff5998e66b
add a note, remove a done deed.
...
llvm-svn: 45869
2008-01-11 18:00:13 +00:00
Arnold Schwaighofer
06da9e2d43
hrm - correct spelling.
...
Actually were not riding any arguments. Sadly there is no semantic spell checker that is going to safe you from such a mistake.
llvm-svn: 45868
2008-01-11 17:10:15 +00:00
Arnold Schwaighofer
6cf72fbbaf
Improve tail call optimized call's argument lowering. Before this
...
commit all arguments where moved to the stack slot where they would
reside on a normal function call before the lowering to the tail call
stack slot. This was done to prevent arguments overwriting each other.
Now only arguments sourcing from a FORMAL_ARGUMENTS node or a
CopyFromReg node with virtual register (could also be a caller's
argument) are lowered indirectly.
--This line, and those below, will be ignored--
M X86/X86ISelLowering.cpp
M X86/README.txt
llvm-svn: 45867
2008-01-11 16:49:42 +00:00
Ted Kremenek
5906b9e79a
Added ProgramPoint.cpp, which implements several methods of the subclasses
...
of ProgramPoint.
llvm-svn: 45866
2008-01-11 16:36:20 +00:00
Arnold Schwaighofer
bf1816ea7b
Correct a copy and paste error.
...
llvm-svn: 45865
2008-01-11 14:34:56 +00:00
Evan Cheng
ef5285ef88
Some C backend ByVal parameter attribute support. Not yet complete.
...
llvm-svn: 45864
2008-01-11 09:12:49 +00:00
Evan Cheng
8c51394e01
Rename Int_CVTSI642SSr* to Int_CVTSI2SS64r* for naming consistency and remove unused instructions.
...
llvm-svn: 45861
2008-01-11 07:37:44 +00:00
Chris Lattner
9283173061
more flags set right
...
llvm-svn: 45860
2008-01-11 07:18:17 +00:00
Chris Lattner
f4b0c99d63
add some missing flags.
...
llvm-svn: 45859
2008-01-11 06:59:07 +00:00
Chris Lattner
6d7cf509d1
don't include loopinfo.h from this file.
...
llvm-svn: 45858
2008-01-11 06:30:04 +00:00
Chris Lattner
b3220147d2
Move typedef of loop to top of the file where it is more obvious.
...
llvm-svn: 45857
2008-01-11 06:29:42 +00:00
Chris Lattner
b97b83fbf7
Fix 80 col violations
...
llvm-svn: 45856
2008-01-11 06:27:42 +00:00
Chris Lattner
5cee13f1df
document the byval parameter attribute.
...
llvm-svn: 45855
2008-01-11 06:20:47 +00:00
Chris Lattner
87b0c13104
add some notes.
...
llvm-svn: 45854
2008-01-11 06:17:47 +00:00
Chris Lattner
908117bf69
When inlining a functino with a byval argument, make an explicit
...
copy of it in case the callee modifies the struct.
llvm-svn: 45853
2008-01-11 06:09:30 +00:00
Evan Cheng
aaef8ce856
A couple of obvious off-by-one bugs.
...
llvm-svn: 45852
2008-01-11 03:07:46 +00:00
Scott Michel
8d5841ae3c
More CellSPU refinement and progress:
...
- Cleaned up custom load/store logic, common code is now shared [see note
below], cleaned up address modes
- More test cases: various intrinsics, structure element access (load/store
test), updated target data strings, indirect function calls.
Note: This patch contains a refactoring of the LoadSDNode and StoreSDNode
structures: they now share a common base class, LSBaseSDNode, that
provides an interface to their common functionality. There is some hackery
to access the proper operand depending on the derived class; otherwise,
to do a proper job would require finding and rearranging the SDOperands
sent to StoreSDNode's constructor. The current refactor errs on the
side of being conservatively and backwardly compatible while providing
functionality that reduces redundant code for targets where loads and
stores are custom-lowered.
llvm-svn: 45851
2008-01-11 02:53:15 +00:00
Evan Cheng
4cc275c3fb
Allow parameter attributes on varargs function parameters.
...
llvm-svn: 45850
2008-01-11 02:13:09 +00:00
Dale Johannesen
193daf0698
Weak zeroes don't go in bss on Darwin.
...
llvm-svn: 45849
2008-01-11 01:59:45 +00:00
Dale Johannesen
2ff66f08f2
Weak things initialized to 0 don't go in bss on Darwin.
...
Cosmetic changes to spacing to match gcc (some dejagnu
tests actually care).
llvm-svn: 45848
2008-01-11 00:54:37 +00:00
Ted Kremenek
b1dec454bb
Renamed ProgramEdge.h to ProgramPoint.h
...
llvm-svn: 45847
2008-01-11 00:43:12 +00:00
Ted Kremenek
e5ccf9a96c
Renamed ProgramEdge to ProgramPoint and changed subclasses of ProgramEdge
...
to have a much simpler, cleaner interpretation of what is a "location"
in a function (as encoded by a CFG).
llvm-svn: 45846
2008-01-11 00:40:29 +00:00
Ted Kremenek
d7a7abed62
Fixed 80-col violation.
...
llvm-svn: 45845
2008-01-11 00:18:40 +00:00
Chris Lattner
c8226f32e9
Simplify the side effect stuff a bit more and make licm/sinking
...
both work right according to the new flags.
This removes the TII::isReallySideEffectFree predicate, and adds
TII::isInvariantLoad.
It removes NeverHasSideEffects+MayHaveSideEffects and adds
UnmodeledSideEffects as machine instr flags. Now the clients
can decide everything they need.
I think isRematerializable can be implemented in terms of the
flags we have now, though I will let others tackle that.
llvm-svn: 45843
2008-01-10 23:08:24 +00:00
Fariborz Jahanian
af5d80cba5
Avoid redefinition of __objcFastEnumerationState
...
llvm-svn: 45842
2008-01-10 23:04:06 +00:00
Chris Lattner
f3bd2cd37c
Clamp down on sinking of lots of instructions.
...
llvm-svn: 45841
2008-01-10 22:35:15 +00:00
Steve Naroff
98f7203680
- Teach Expr::isConstantExpr() about InitListExpr's (and offsetof, since I noticed it was missing).
...
- Rename CheckInitializer() to CheckInitializerTypes().
- Removed the isStatic argument to CheckInitializerTypes() and all of it's subroutines. Checking for constant expressions is now done separately.
- Added CheckForConstantInitializer().
llvm-svn: 45840
2008-01-10 22:15:12 +00:00
Fariborz Jahanian
939776756f
Recover from user typo not having proper @interface decl and a bad foreach decl.
...
llvm-svn: 45839
2008-01-10 20:33:58 +00:00
Chris Lattner
8e60f2c996
IMPLICIT_USE and IMPLICIT_DEF are dead, remove them.
...
llvm-svn: 45838
2008-01-10 19:27:54 +00:00
Chris Lattner
1d07b65add
add a note
...
llvm-svn: 45837
2008-01-10 18:25:41 +00:00
Fariborz Jahanian
2de9a0be09
Remove non-ascii chaaracter from diagnostic
...
llvm-svn: 45836
2008-01-10 18:10:31 +00:00
Ted Kremenek
e67952fcd9
Fixed non-ASCII quote.
...
llvm-svn: 45835
2008-01-10 18:08:55 +00:00
Fariborz Jahanian
c644ee4992
Warn (as gcc does) when @end does not close anything.
...
llvm-svn: 45834
2008-01-10 17:58:07 +00:00
Duncan Sands
53c954fa86
Output sinl for a long double FSIN node, not sin.
...
Likewise fix up a bunch of other libcalls. While
there I remove NEG_F32 and NEG_F64 since they are
not used anywhere. This fixes 9 Ada ACATS failures.
llvm-svn: 45833
2008-01-10 10:28:30 +00:00
Evan Cheng
f2553ab84f
Only remat loads from immutable stack slots.
...
llvm-svn: 45831
2008-01-10 08:24:38 +00:00
Evan Cheng
8b03bafd37
Simplify some code.
...
llvm-svn: 45830
2008-01-10 08:22:10 +00:00
Chris Lattner
317332fc2a
Start inferring side effect information more aggressively, and fix many bugs in the
...
x86 backend where instructions were not marked maystore/mayload, and perf issues where
instructions were not marked neverHasSideEffects. It would be really nice if we could
write patterns for copy instructions.
I have audited all the x86 instructions down to MOVDQAmr. The flags on others and on
other targets are probably not right in all cases, but no clients currently use this
info that are enabled by default.
llvm-svn: 45829
2008-01-10 07:59:24 +00:00
Evan Cheng
4c1f731905
Clearify the meaning of immutable StackObject.
...
llvm-svn: 45828
2008-01-10 07:19:43 +00:00
Chris Lattner
70ddafaf45
Fix a crash on code like: let x = 1 {x
...
llvm-svn: 45827
2008-01-10 07:01:53 +00:00
Chris Lattner
2e38f2458c
rename X86InstrX86-64.td -> X86Instr64bit.td
...
llvm-svn: 45826
2008-01-10 05:50:42 +00:00
Chris Lattner
520d4adad3
add SDNPSideEffect node property declaration
...
llvm-svn: 45825
2008-01-10 05:48:23 +00:00
Chris Lattner
aca7ca3730
remove explicit sets of 'neverHasSideEffects' that can now be
...
inferred from the instr patterns.
llvm-svn: 45824
2008-01-10 05:45:39 +00:00
Chris Lattner
86c458a178
if an instr lacks a pattern, assume it has side effects (unless never has s-e is true).
...
llvm-svn: 45823
2008-01-10 05:40:54 +00:00
Chris Lattner
42c63ef96e
start inferring 'no side effects'.
...
llvm-svn: 45822
2008-01-10 05:39:30 +00:00
Chris Lattner
94de7bc3aa
get def use info more correct.
...
llvm-svn: 45821
2008-01-10 05:12:37 +00:00
Ted Kremenek
aa8c904dfc
Added some text about the ccc script provided by Sanghyeon Seo.
...
llvm-svn: 45820
2008-01-10 04:59:05 +00:00
Chris Lattner
9e69654461
Infer mayload
...
llvm-svn: 45819
2008-01-10 04:44:48 +00:00
Chris Lattner
c72335878d
add SDNPMayLoad to the 'load' sdnode definition. This is enough to get all the x86
...
instructions (with patterns) that load memory marked, for example.
llvm-svn: 45818
2008-01-10 04:44:32 +00:00
Chris Lattner
1ca2068227
realize that instructions who match intrinsics that read memory read memory.
...
Also, instructions with any nodes that are SDNPMayLoad also read memory.
llvm-svn: 45817
2008-01-10 04:38:57 +00:00
Chris Lattner
f171482a66
verify that the frame index is immutable before remat'ing (still disabled)
...
or being side-effect free.
llvm-svn: 45816
2008-01-10 04:16:31 +00:00
Owen Anderson
d445b8813f
Don't use LiveVariables::VarInfo::DefInst.
...
llvm-svn: 45815
2008-01-10 03:12:54 +00:00
Evan Cheng
0f8c7c4a73
Codegen improvement has reduced one spill.
...
llvm-svn: 45814
2008-01-10 02:54:40 +00:00
Evan Cheng
a26552493b
Mark byval parameter stack objects mutable for now.
...
llvm-svn: 45813
2008-01-10 02:24:25 +00:00
Evan Cheng
301b0cade5
Add a isImmutable bit to StackObject. Fixed stack objects are immutable (in the function) unless specified otherwise.
...
llvm-svn: 45812
2008-01-10 02:18:37 +00:00
Dale Johannesen
7ecb3b79c7
Emit unused EH frames for weak definitions on Darwin,
...
because assembler/linker can't cope with weak absolutes.
PR 1880.
llvm-svn: 45811
2008-01-10 02:03:30 +00:00
Chris Lattner
2cbf2f39ee
add support for the GCC -include option.
...
llvm-svn: 45810
2008-01-10 01:53:41 +00:00
Seo Sanghyeon
77133e6d30
Compiler driver
...
llvm-svn: 45809
2008-01-10 01:43:47 +00:00
Chris Lattner
bceeefdc9c
Fix some 80 col violations
...
llvm-svn: 45808
2008-01-10 01:43:14 +00:00
Chris Lattner
d2cdb97747
Ted apparently likes crazy whitespace at the end of line. Crush his spirit by
...
removing them, fitting the file into 80 columns. :)
llvm-svn: 45807
2008-01-10 01:41:55 +00:00
Fariborz Jahanian
7262fca0a6
Put return type of synthesize method on same line as method declaration, space after method declaration header.
...
llvm-svn: 45806
2008-01-10 01:39:52 +00:00
Owen Anderson
4f45cef2f9
Get rid of all uses of LiveVariables::VarInfo::DefInst in favor of the equivalent API from
...
MachineRegisterInfo. Once all clients are switched over, the former will be going away.
llvm-svn: 45805
2008-01-10 01:36:43 +00:00
Chris Lattner
cb0e1bcf0c
provide def_* and use_* iterators in addition to reg_* iterators.
...
The first only returns definitions of a register, the second only
returns uses, the third returns both.
llvm-svn: 45803
2008-01-10 01:01:27 +00:00
Ted Kremenek
3d55c84c99
Added "InfeasibleEdge" to represent an infeasible state transition.
...
llvm-svn: 45802
2008-01-10 00:58:25 +00:00
Owen Anderson
51b8e20ccf
Add more comments explaining the basics of how the decision of when to rename and when to insert
...
copies is made.
llvm-svn: 45799
2008-01-10 00:47:01 +00:00
Evan Cheng
fead113fe0
Do not use the stack pointer directly, issue a copyfromreg instead. Otherwise we can end up with something like ADD32ri %esp, x which two-address pass won't like.
...
llvm-svn: 45798
2008-01-10 00:37:26 +00:00
Owen Anderson
8958a78576
Get rid of the isKillInst predicate. LiveVariables already provides this information.
...
llvm-svn: 45797
2008-01-10 00:33:11 +00:00
Chris Lattner
ec79bba97f
Fix PR1845 and rdar://5676945. Generic vectors smaller
...
than hardware supported type will be scalarized, so we
can infer their alignment from that info.
We now codegen pr1845 into:
_boolVectorSelect:
lbz r2, 0(r3)
stb r2, -16(r1)
blr
llvm-svn: 45796
2008-01-10 00:30:57 +00:00
Chris Lattner
e34d7d0e24
new testcase for PR1845
...
llvm-svn: 45795
2008-01-10 00:30:38 +00:00
Fariborz Jahanian
db701b47d2
Pass rewritten output to 'clang' for verification.
...
llvm-svn: 45794
2008-01-10 00:30:24 +00:00
Fariborz Jahanian
82ae0152a7
Allow messaging expression as foreach's collection expression.
...
llvm-svn: 45793
2008-01-10 00:24:29 +00:00
Evan Cheng
73d1017871
Remove comments that do not correspond to anything after recent refactoring.
...
llvm-svn: 45792
2008-01-10 00:09:10 +00:00
Owen Anderson
1c8152ba03
Copies need to be inserted before the first terminator, not at the end of the block.
...
llvm-svn: 45791
2008-01-10 00:01:41 +00:00
Steve Naroff
a385fb8c2e
Add a FIXME to commit r45784. Thanks mrs!
...
llvm-svn: 45790
2008-01-09 23:44:05 +00:00
Steve Naroff
e6b0ec8b5e
Fix Sema::ActOnDeclarator() to call MergeFunctionDecl for function decls that aren't in scope. Since C functions are in a flat namespace, we need to give them special treatment (when compared with variables and typedefs).
...
llvm-svn: 45789
2008-01-09 23:34:55 +00:00
Ted Kremenek
24ea11d4e0
Renamed various traits and classes. Added "Infeasible" bit to ExplodedNodeImpl
...
so that nodes can be marked as representing an infeasible program point. This
flag lets the path-sensitive solver know that no successors should be generated
for such nodes.
llvm-svn: 45788
2008-01-09 23:11:36 +00:00
Evan Cheng
0e400d4cb7
Special copy SUnit's do not have SDNode's.
...
llvm-svn: 45787
2008-01-09 23:01:55 +00:00
Ted Kremenek
84ab850e46
Renamed Stmt***Edge and ***StmtEdge (where *** = "Stmt" or "Blk") classes to
...
BExpr*** and ***BExpr respectively. These edges represent program locations
between the entrance/exit of a block and Block-level Expressions.
Also added ***SExpr and SExpr*** ProgramEdges to represent the locations in the
program between the evaluation of subexpressions and block-level expressions.
llvm-svn: 45786
2008-01-09 22:52:38 +00:00
Ted Kremenek
fed4cce0cc
Removed some files related to the path-sensitive solver as part of some
...
code restructuring. (new files will be introduced shortly)
llvm-svn: 45785
2008-01-09 22:49:37 +00:00
Steve Naroff
c6edcbdb5d
Fix ASTContext::typesAreCompatible to allow for int/enum compatibility (C99 6.7.2.2p4).
...
Fix Sema::MergeFunctionDecl to allow for function type compatibility (by using the predicate on ASTContext). Function types don't have to be identical to be compatible...
llvm-svn: 45784
2008-01-09 22:43:08 +00:00
Owen Anderson
436db42a3c
Clean up StrongPHIElimination a bit, and add some more comments to the internal structures. There's
...
still more work to do on this front.
llvm-svn: 45783
2008-01-09 22:40:54 +00:00
Steve Naroff
08ddb8c55c
Teach Sema::ActOnCompoundLiteral about constraint C99 6.5.2.5p3.
...
llvm-svn: 45782
2008-01-09 20:58:06 +00:00
Duncan Sands
48f22f0b80
Fix compile failures with g++-4.3.
...
llvm-svn: 45781
2008-01-09 19:42:09 +00:00
Chris Lattner
204e4a27b6
many cleanups and fixed, contributed by Sam Bishop
...
llvm-svn: 45780
2008-01-09 19:28:50 +00:00
Chris Lattner
119d81a4f4
Fix isIntegerConstantExpr to compare against zero for casts to bool instead of
...
truncating. This allows us to compile:
void foo() {
static _Bool foo = 4;
}
into:
@foo1 = internal global i8 1
instead of:
@foo1 = internal global i8 4
llvm-svn: 45779
2008-01-09 18:59:34 +00:00
Chris Lattner
41a1ef0dfe
implement proper support for _Bool in memory, which is usually i8, not i1.
...
This fixes a crash reported by Seo Sanghyeon
llvm-svn: 45778
2008-01-09 18:47:25 +00:00
Fariborz Jahanian
6fa7516bc9
Type-cast RHS of assignment to prevent warning compiling rewritten foreach code.
...
llvm-svn: 45777
2008-01-09 18:15:42 +00:00
Fariborz Jahanian
22f2347791
Fixed a bug whereby a parethesized collection expression was not being rewritten correctly.
...
llvm-svn: 45776
2008-01-09 17:50:00 +00:00
Owen Anderson
4de0c3978d
StrongPHIElim: Now with even fewer trivial bugs!
...
llvm-svn: 45775
2008-01-09 10:41:39 +00:00
Owen Anderson
77c3fe441b
Fix an infinite recursion bug in InsertCopies.
...
llvm-svn: 45774
2008-01-09 10:32:30 +00:00
Owen Anderson
e0fd9bd35a
Fix some simple bugs. StrongPHIElimination now does not crash on 164.gzip.
...
llvm-svn: 45773
2008-01-09 06:19:05 +00:00
Evan Cheng
a31824a08e
Fix sse2.psrl.w and sse2.psrl.q definitions.
...
llvm-svn: 45772
2008-01-09 02:16:44 +00:00
Fariborz Jahanian
b7e7ee9ff3
Typo fixed.
...
llvm-svn: 45771
2008-01-09 01:25:54 +00:00
Chris Lattner
7ff4a8bf3f
Fix llvm-ld -Xlinker, patch by Daniel Teske!
...
llvm-svn: 45770
2008-01-09 01:01:17 +00:00
Fariborz Jahanian
05d2876ec3
Another test case for testing rewriteing of nested foreach-statement.
...
llvm-svn: 45769
2008-01-09 00:47:02 +00:00
Chris Lattner
9129f51f9b
add a testcase
...
llvm-svn: 45768
2008-01-09 00:37:18 +00:00
Fariborz Jahanian
a305a5609e
Remove dependency on objc.h
...
llvm-svn: 45767
2008-01-09 00:33:05 +00:00
Chris Lattner
45e5032b1d
add a note
...
llvm-svn: 45766
2008-01-09 00:17:57 +00:00
Steve Naroff
66a26044f8
Teach Expr::isConstantExpr() about CompoundLiterals.
...
llvm-svn: 45764
2008-01-09 00:05:37 +00:00
Chris Lattner
82bebb2432
Fix a typo, patch by Mike Stump!
...
llvm-svn: 45763
2008-01-09 00:00:15 +00:00
Chris Lattner
51b01bf8a5
Make load->store deletion a bit smarter. This allows us to compile this:
...
void test(long long *P) { *P ^= 1; }
into just:
_test:
movl 4(%esp), %eax
xorl $1, (%eax)
ret
instead of code like this:
_test:
movl 4(%esp), %ecx
xorl $1, (%ecx)
movl 4(%ecx), %edx
movl %edx, 4(%ecx)
ret
llvm-svn: 45762
2008-01-08 23:08:06 +00:00
Fariborz Jahanian
965a8961c7
Patch to rewrite ObjC2's foreach-stmt.
...
llvm-svn: 45760
2008-01-08 22:06:28 +00:00
Owen Anderson
1b0d5c747e
Rename registers that do not need copies.
...
llvm-svn: 45759
2008-01-08 21:54:52 +00:00
Duncan Sands
7b1460cca4
Crashes llc when using Chris's new legalization logic.
...
llvm-svn: 45758
2008-01-08 21:51:53 +00:00
Ted Kremenek
a0a2881b1e
Added "getRoot()" to ImmutableMap.
...
Made the ctor for ImmutableMap to construct a map from an AVL tree public.
llvm-svn: 45756
2008-01-08 21:05:59 +00:00
Ted Kremenek
9b0f70bb85
Fixed 80 col. violation.
...
llvm-svn: 45752
2008-01-08 19:38:55 +00:00
Ted Kremenek
96b1ce4f0a
Added VISIBILITY_HIDDEN to classes/structs in anonymous namespaces.
...
llvm-svn: 45750
2008-01-08 18:19:08 +00:00
Ted Kremenek
83ebcef8ae
Added VISIBILITY_HIDDEN to classes/structs in anonymous namespace.
...
llvm-svn: 45749
2008-01-08 18:15:10 +00:00
Chris Lattner
07fde9bde1
add a mayLoad property for machine instructions, a correlary to mayStore.
...
This is currently not set by anything.
llvm-svn: 45748
2008-01-08 18:05:21 +00:00
Ted Kremenek
7e41c29a86
Added most of the boilerplate to the driver needed to run the graph-reachability
...
constant propagation analysis.
llvm-svn: 45747
2008-01-08 18:04:06 +00:00
Duncan Sands
bb956ca730
Use size_t to store Pos, avoid truncating value
...
on 64-bit builds. Analysis and original patch
by Török Edwin. Code audit found another place
with the same problem, also fixed here.
llvm-svn: 45746
2008-01-08 10:06:15 +00:00
Chris Lattner
2940c5c56d
Implement PR1795, an instcombine hack for forming GEPs with integer pointer arithmetic.
...
llvm-svn: 45745
2008-01-08 07:23:51 +00:00
Chris Lattner
ff71ec4dfb
add match support for casts.
...
llvm-svn: 45744
2008-01-08 07:02:44 +00:00
Chris Lattner
b17db3afa8
remove darwin/i386 t-t
...
llvm-svn: 45743
2008-01-08 06:52:51 +00:00
Chris Lattner
89f36e6b21
Finally implement correct ordered comparisons for PPC, even though
...
the code generated is not wonderful. This turns a miscompilation into
a code quality bug (noted in the ppc readme). This fixes PR642, which
is over 2 years old (!). Nate, please review this.
llvm-svn: 45742
2008-01-08 06:46:30 +00:00
Chris Lattner
184f79a5e1
Testcase for PR1721
...
llvm-svn: 45739
2008-01-08 05:16:29 +00:00
Owen Anderson
812e1ea7cf
Actually insert copies now!
...
llvm-svn: 45738
2008-01-08 05:16:15 +00:00
Chris Lattner
97879424fe
Fix PR1797
...
llvm-svn: 45736
2008-01-08 04:26:20 +00:00
Chris Lattner
e3e358c317
readability improvement suggested by Sam Bishop, thanks!
...
llvm-svn: 45735
2008-01-08 04:13:21 +00:00
Evan Cheng
00300ddff1
Minor fix to enable x86-64 pic jit (still fails for other reasons).
...
llvm-svn: 45734
2008-01-08 02:07:10 +00:00
Evan Cheng
4951da49aa
Fix a x86-64 static codegen bug. This fixes a lot of x86-64 jit failures.
...
llvm-svn: 45733
2008-01-08 02:06:11 +00:00
Steve Naroff
039ad3cf90
Fix Sema::CheckConditionalOperands(). The null pointer constant checks need to precede the check for two pointer operands.
...
llvm-svn: 45732
2008-01-08 01:11:38 +00:00
Bill Wendling
3b6fe5fa8d
Silence warning about loss of precision.
...
llvm-svn: 45731
2008-01-08 00:52:29 +00:00
Ted Kremenek
9384343c11
Added nodes_iterator to the GraphTrait for ExplodedNode<>.
...
llvm-svn: 45730
2008-01-08 00:46:00 +00:00
Ted Kremenek
a3da232ce7
Added GraphTraits<> partial specializations for ExplodedNode<> classes.
...
llvm-svn: 45729
2008-01-08 00:26:05 +00:00
Ted Kremenek
551e4ce74e
Relocated comment in header.
...
llvm-svn: 45728
2008-01-08 00:07:06 +00:00
Evan Cheng
7250120177
Only mark instructions that load a single value without extension as isSimpleLoad = 1.
...
llvm-svn: 45727
2008-01-07 23:56:57 +00:00
Chris Lattner
ba734518c1
add a new bit.
...
llvm-svn: 45726
2008-01-07 23:16:55 +00:00
Evan Cheng
8242168ef4
Unbreak x86-64.
...
llvm-svn: 45725
2008-01-07 23:08:23 +00:00
Ted Kremenek
35ff5b0ee6
Added more boilerplate for processing end-of-paths.
...
llvm-svn: 45724
2008-01-07 22:22:13 +00:00
Chris Lattner
ef81aa75f6
add a note that is important for some fp apps.
...
llvm-svn: 45723
2008-01-07 21:59:58 +00:00
Ted Kremenek
8569309bca
Added ownership of "checker state" within the ExplodedGraph. Moved code that
...
creates the initial root node from the constructor of ReachabilityEngine to
ReachabilityEngine::ExecuteWorklist.
llvm-svn: 45722
2008-01-07 21:56:52 +00:00
Fariborz Jahanian
dc917b9e07
Patch to start rewriting of ObjC2's foreach statement (work in progress).
...
llvm-svn: 45721
2008-01-07 21:40:22 +00:00
Chris Lattner
730d088be1
possible switch lowering improvement.
...
llvm-svn: 45720
2008-01-07 21:38:14 +00:00
Owen Anderson
47299489ec
Oops, missed one.
...
llvm-svn: 45719
2008-01-07 21:32:09 +00:00
Owen Anderson
bbc6352d1f
Make some predicates static.
...
llvm-svn: 45718
2008-01-07 21:30:40 +00:00
Fariborz Jahanian
6917870be5
Verify/add code to make sure types passed to interfaceTypesAreCompatible
...
are canonical. Asst in interfaceTypesAreCompatible if they are not.
llvm-svn: 45717
2008-01-07 20:12:21 +00:00
Chris Lattner
a30be59fa2
Fix a nasty corner case that Neil noticed in PR1900, where we would
...
incorrectly apply the multiple include optimization to files with
guards like:
#if !defined(x) MACRO
where MACRO could expand to different things in different contexts.
Thanks Neil!
llvm-svn: 45716
2008-01-07 19:50:27 +00:00
Ted Kremenek
1b0ea82459
Substituted all instances of the string "Objc" for "ObjC". This fixes
...
some naming inconsistencies in the names of classes pertaining to Objective-C
support in clang.
llvm-svn: 45715
2008-01-07 19:49:32 +00:00
Duncan Sands
c50c210d76
I doubt the address of the Error string was intended
...
to be used for the force_interpreter parameter...
Spotted by gcc-4.2.
llvm-svn: 45714
2008-01-07 19:14:42 +00:00
Fariborz Jahanian
699e638e4f
Make interfaceTypesAreCompatible a private method.
...
llvm-svn: 45713
2008-01-07 19:13:39 +00:00
Duncan Sands
d19a6f4836
Add missing newline at EOF.
...
llvm-svn: 45712
2008-01-07 19:13:36 +00:00
Ted Kremenek
9dbf8a93a7
Renamed SimulVertex, SimulGraph, and SimulEngine to:
...
ExplodedNode, ExplodedGraph (to match the vocabulary in the RHS paper)
ReachabilityEngine
The implementation of the core of the path-sensitive dataflow solver has
been de-templatized and places in ReachabilityEngine.cpp.
The solver is still incomplete.
llvm-svn: 45711
2008-01-07 19:08:42 +00:00
Ted Kremenek
dabea046f6
Minor tweak to serialization of ObjcForCollectionStmt: the three owned pointers
...
are now emitted in a batch, which reduces the metadata overhead in the
serialized bitcode.
llvm-svn: 45710
2008-01-07 18:35:04 +00:00
Fariborz Jahanian
d5450b7f07
Limit type of foreach's element and collection to be a pointer to
...
objc object type.
llvm-svn: 45709
2008-01-07 18:14:04 +00:00
Fariborz Jahanian
fef287cb67
Issue diagnostics if more than one declaration in objectove-c's foreach-stmt header.
...
llvm-svn: 45708
2008-01-07 17:52:35 +00:00
Nate Begeman
281653b25e
Update the comment on scalar to vector to be a bit more clear.
...
llvm-svn: 45707
2008-01-07 17:52:24 +00:00
Chris Lattner
f5c973d061
minor cleanup.
...
llvm-svn: 45706
2008-01-07 17:51:46 +00:00
Nate Begeman
d3d49df3f1
Update test to catch recent x86 insert regression and improvements
...
llvm-svn: 45705
2008-01-07 17:49:23 +00:00
Duncan Sands
b18c30acec
Small cleanup for handling of type/parameter attribute
...
incompatibility.
llvm-svn: 45704
2008-01-07 17:16:06 +00:00
Duncan Sands
d8d4170f84
Unbreak x86-32 darwin long double!
...
llvm-svn: 45703
2008-01-07 16:36:38 +00:00
Duncan Sands
28bf7ac219
Fix long double support on x86-32 linux.
...
llvm-svn: 45701
2008-01-07 13:44:22 +00:00
Gordon Henriksen
24db8d383d
Pruning includes.
...
llvm-svn: 45700
2008-01-07 13:30:38 +00:00
Bill Wendling
a3bdad153f
Operand 1 should be a register. We don't care if it's a preg, vreg, or 0.
...
llvm-svn: 45699
2008-01-07 08:05:29 +00:00
Chris Lattner
d7857eafd0
add a note
...
llvm-svn: 45698
2008-01-07 07:46:23 +00:00
Chris Lattner
f3efadcb5b
remove #includage
...
llvm-svn: 45697
2008-01-07 07:42:25 +00:00
Chris Lattner
69fc766f63
split TargetInstrDesc out into its own header file.
...
llvm-svn: 45696
2008-01-07 07:33:08 +00:00
Chris Lattner
03ad885039
rename TargetInstrDescriptor -> TargetInstrDesc.
...
Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.
llvm-svn: 45695
2008-01-07 07:27:27 +00:00
Chris Lattner
3ef160b15a
remove a dead method.
...
llvm-svn: 45694
2008-01-07 06:47:10 +00:00
Chris Lattner
fd2e338b85
simplify some code.
...
llvm-svn: 45693
2008-01-07 06:47:00 +00:00
Chris Lattner
e99a6caee4
Rename all the M_* flags to be namespace qualified enums, and switch
...
all clients over to using predicates instead of these flags directly.
These are now private values which are only to be used to statically
initialize the tables.
llvm-svn: 45692
2008-01-07 06:42:05 +00:00
Chris Lattner
d004f54155
use predicate.
...
llvm-svn: 45691
2008-01-07 06:37:29 +00:00
Chris Lattner
08a69ac2f5
add more and significantly better comments to the rest of the machineinstr
...
flags that can be set. Add predicates for the ones lacking it, and switch
some clients over to using the predicates instead of Flags directly.
llvm-svn: 45690
2008-01-07 06:21:53 +00:00
Chris Lattner
769c86bf63
simplify some code using new predicates
...
llvm-svn: 45689
2008-01-07 05:40:58 +00:00
Chris Lattner
c5c63ff9d7
add some mroe comments, add a isImplicitDef() method, add
...
isConditionalBranch() and isUnconditionalBranch() methods.
llvm-svn: 45688
2008-01-07 05:38:38 +00:00
Chris Lattner
f376c99ea0
rename hasVariableOperands() -> isVariadic(). Add some comments.
...
Evan, please review the comments I added to getNumDefs to make sure
that they are accurate, thx.
llvm-svn: 45687
2008-01-07 05:19:29 +00:00
Chris Lattner
fd548c96cc
Move M_* flags down in the file. Move SchedClass up in the
...
TargetInstrDescriptor class and shrink to 16-bits, saving a
word in TargetInstrDescriptor. Add some comments.
llvm-svn: 45686
2008-01-07 05:06:49 +00:00
Chris Lattner
8c69898157
remove a dead field.
...
llvm-svn: 45685
2008-01-07 04:57:42 +00:00
Chris Lattner
6f8713decb
the name field of instructions is never set to a non-empty string,
...
just unconditionally use the def name of the instruction.
llvm-svn: 45684
2008-01-07 04:57:31 +00:00
Chris Lattner
6077962101
no need to explicitly clear these fields.
...
llvm-svn: 45683
2008-01-07 04:55:09 +00:00
Nate Begeman
f7c3ff6f80
Fix typo
...
llvm-svn: 45682
2008-01-07 04:01:26 +00:00
Gordon Henriksen
c75405bdb3
Removing a leaked file.
...
llvm-svn: 45681
2008-01-07 03:23:52 +00:00
Chris Lattner
b0d06b4381
Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptor
...
llvm-svn: 45680
2008-01-07 03:13:06 +00:00
Chris Lattner
f0f438a517
remove MachineOpCode typedef.
...
llvm-svn: 45679
2008-01-07 02:48:55 +00:00
Chris Lattner
d34c47653e
remove some uses of MachineOpCode, move getSchedClass
...
into TargetInstrDescriptor from TargetInstrInfo.
llvm-svn: 45678
2008-01-07 02:46:03 +00:00
Chris Lattner
e55e115616
Add predicates methods to TargetOperandInfo, and switch all clients
...
over to using them, instead of diddling Flags directly. Change the
various flags from const variables to enums.
llvm-svn: 45677
2008-01-07 02:39:19 +00:00
Gordon Henriksen
c7e991b7c3
Setting GlobalDirective in TargetAsmInfo by default rather than
...
providing a misleading facility. It's used once in the MIPS backend
and hardcoded as "\t.globl\t" everywhere else.
llvm-svn: 45676
2008-01-07 02:31:11 +00:00
Gordon Henriksen
efb08802ec
Deleting an empty file. Thanks, /usr/bin/patch!
...
llvm-svn: 45675
2008-01-07 02:29:04 +00:00
Chris Lattner
a98c679de0
Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects
...
that it is cheap and efficient to get.
Move a variety of predicates from TargetInstrInfo into
TargetInstrDescriptor, which makes it much easier to query a predicate
when you don't have TII around. Now you can use MI->getDesc()->isBranch()
instead of going through TII, and this is much more efficient anyway. Not
all of the predicates have been moved over yet.
Update old code that used MI->getInstrDescriptor()->Flags to use the
new predicates in many places.
llvm-svn: 45674
2008-01-07 01:56:04 +00:00
Owen Anderson
0ec92e9d64
Update CodeGen for MRegisterInfo --> TargetInstrInfo changes.
...
llvm-svn: 45673
2008-01-07 01:35:56 +00:00
Owen Anderson
2a3be7bb6c
Move even more functionality from MRegisterInfo into TargetInstrInfo.
...
Some day I'll get it all moved over...
llvm-svn: 45672
2008-01-07 01:35:02 +00:00
Gordon Henriksen
2d684b1fbf
Ammending r45669 with a missing file.
...
llvm-svn: 45671
2008-01-07 01:33:09 +00:00
Gordon Henriksen
6047b6e140
With this patch, the LowerGC transformation becomes the
...
ShadowStackCollector, which additionally has reduced overhead with
no sacrifice in portability.
Considering a function @fun with 8 loop-local roots,
ShadowStackCollector introduces the following overhead
(x86):
; shadowstack prologue
movl L_llvm_gc_root_chain$non_lazy_ptr, %eax
movl (%eax), %ecx
movl $___gc_fun, 20(%esp)
movl $0, 24(%esp)
movl $0, 28(%esp)
movl $0, 32(%esp)
movl $0, 36(%esp)
movl $0, 40(%esp)
movl $0, 44(%esp)
movl $0, 48(%esp)
movl $0, 52(%esp)
movl %ecx, 16(%esp)
leal 16(%esp), %ecx
movl %ecx, (%eax)
; shadowstack loop overhead
(none)
; shadowstack epilogue
movl 48(%esp), %edx
movl %edx, (%ecx)
; shadowstack metadata
.align 3
___gc_fun: # __gc_fun
.long 8
.space 4
In comparison to LowerGC:
; lowergc prologue
movl L_llvm_gc_root_chain$non_lazy_ptr, %eax
movl (%eax), %ecx
movl %ecx, 48(%esp)
movl $8, 52(%esp)
movl $0, 60(%esp)
movl $0, 56(%esp)
movl $0, 68(%esp)
movl $0, 64(%esp)
movl $0, 76(%esp)
movl $0, 72(%esp)
movl $0, 84(%esp)
movl $0, 80(%esp)
movl $0, 92(%esp)
movl $0, 88(%esp)
movl $0, 100(%esp)
movl $0, 96(%esp)
movl $0, 108(%esp)
movl $0, 104(%esp)
movl $0, 116(%esp)
movl $0, 112(%esp)
; lowergc loop overhead
leal 44(%esp), %eax
movl %eax, 56(%esp)
leal 40(%esp), %eax
movl %eax, 64(%esp)
leal 36(%esp), %eax
movl %eax, 72(%esp)
leal 32(%esp), %eax
movl %eax, 80(%esp)
leal 28(%esp), %eax
movl %eax, 88(%esp)
leal 24(%esp), %eax
movl %eax, 96(%esp)
leal 20(%esp), %eax
movl %eax, 104(%esp)
leal 16(%esp), %eax
movl %eax, 112(%esp)
; lowergc epilogue
movl 48(%esp), %edx
movl %edx, (%ecx)
; lowergc metadata
(none)
llvm-svn: 45670
2008-01-07 01:30:53 +00:00
Gordon Henriksen
5180e85675
Enabling the target-independent garbage collection infrastructure by hooking it
...
up to the various compiler pipelines.
This doesn't actually add support for any GC algorithms, which means it
temporarily breaks a few tests. To be fixed shortly.
llvm-svn: 45669
2008-01-07 01:30:38 +00:00
Chris Lattner
b296b0f1c1
The pic base can't be duplicated.
...
llvm-svn: 45668
2008-01-06 23:49:32 +00:00
Chris Lattner
a4ce4f6987
rename isLoad -> isSimpleLoad due to evan's desire to have such a predicate.
...
llvm-svn: 45667
2008-01-06 23:38:27 +00:00
Chris Lattner
4d3b0f579c
rearrange some code.
...
llvm-svn: 45666
2008-01-06 22:50:31 +00:00
Chris Lattner
e2949f42d3
some simplifications/cleanups to ?: sema.
...
llvm-svn: 45665
2008-01-06 22:42:25 +00:00
Chris Lattner
cfb6f430b6
Emit warnings like "dereferencing void pointer" instead of trying to
...
pretty print the type name for void.
llvm-svn: 45664
2008-01-06 22:21:46 +00:00
Gordon Henriksen
db911e9037
Modify Makefile.rules to allow makefiles to prepend to C.Flags and
...
fiends. Change Makefile.ocaml to not touch CFLAGS.
llvm-svn: 45663
2008-01-06 21:54:35 +00:00
Chris Lattner
2a1993fb2c
improve description of alignment, patch by Alain Frisch.
...
llvm-svn: 45662
2008-01-06 21:04:43 +00:00
Chris Lattner
ec56402557
Fix typo noticed by 'Danny' in PR1901
...
llvm-svn: 45661
2008-01-06 19:51:52 +00:00
Chris Lattner
466e8ebcc7
back out accidental commit.
...
llvm-svn: 45660
2008-01-06 19:19:32 +00:00
Chris Lattner
460d863ba5
fix an accidental commit that broke all the testers :(
...
llvm-svn: 45659
2008-01-06 19:18:52 +00:00
Duncan Sands
404eb05247
The transform that tries to turn calls to bitcast functions into
...
direct calls bails out unless caller and callee have essentially
equivalent parameter attributes. This is illogical - the callee's
attributes should be of no relevance here. Rework the logic, which
incidentally fixes a crash when removed arguments have attributes.
llvm-svn: 45658
2008-01-06 18:27:01 +00:00
Duncan Sands
55e5090fe8
When transforming a call to a bitcast function into
...
a direct call with cast parameters and cast return
value (if any), instcombine was prepared to cast any
non-void return value into any other, whether castable
or not. Add a new predicate for testing whether casting
is valid, and check it both for the return value and
(as a cleanup) for the parameters.
llvm-svn: 45657
2008-01-06 10:12:28 +00:00
Chris Lattner
10324d0175
rename isStore -> mayStore to more accurately reflect what it captures.
...
llvm-svn: 45656
2008-01-06 08:36:04 +00:00
Duncan Sands
1694a53c5d
Remove an unused variable.
...
llvm-svn: 45655
2008-01-06 07:43:13 +00:00
Chris Lattner
a348f55ec6
Change the 'isStore' inferrer to look for 'SDNPMayStore'
...
instead of "ISD::STORE". This allows us to mark target-specific dag
nodes as storing (such as ppc byteswap stores). This allows us to remove
more explicit isStore flags from the .td files.
Finally, add a warning for when a .td file contains an explicit
isStore and tblgen is able to infer it.
llvm-svn: 45654
2008-01-06 06:44:58 +00:00
Chris Lattner
f4d55ec4e8
remove explicit isStore flags that are now inferrable.
...
llvm-svn: 45653
2008-01-06 05:55:01 +00:00
Chris Lattner
e20f380fbf
remove some isStore flags that are now inferred automatically.
...
llvm-svn: 45652
2008-01-06 05:53:26 +00:00
Chris Lattner
e9dba0920b
describe isStore and simplify the implementation of hasUnmodelledSideEffects.
...
No functionality change.
llvm-svn: 45651
2008-01-06 05:43:21 +00:00
Chris Lattner
89c6566577
set the 'isstore' flag for instructions whose pattern is an
...
intrinsic that writes to memory.
llvm-svn: 45650
2008-01-06 05:36:50 +00:00
Nick Lewycky
0e519bb555
Accept both %y, %x and %x, %y as valid answers.
...
llvm-svn: 45649
2008-01-06 03:12:44 +00:00
Chris Lattner
e457fd1e9b
remove some old hacky code that tried to infer whether a store
...
occured in a pattern, but failed miserably. The new code works for
any instruction that has a store in its pattern, including all the
x86 mem op mem instructions.
The only target-independent code that uses this is branch folding,
so this won't change anything in practice.
llvm-svn: 45648
2008-01-06 02:16:26 +00:00
Chris Lattner
27a4c1515a
rearrange some code to allow inferring instr info from the pattern of the instr, but don't do so yet.
...
llvm-svn: 45647
2008-01-06 01:53:37 +00:00
Chris Lattner
d5326def4a
improve const correctness.
...
llvm-svn: 45646
2008-01-06 01:52:22 +00:00
Chris Lattner
ea2d52d867
Split the impl of CodeGenInstruction out to its own .cpp file, add a getName() accessor.
...
llvm-svn: 45645
2008-01-06 01:35:39 +00:00
Chris Lattner
85467a17ae
final cleanups.
...
llvm-svn: 45644
2008-01-06 01:21:51 +00:00
Chris Lattner
626b89daa4
further simplifications and cleanup
...
llvm-svn: 45643
2008-01-06 01:20:13 +00:00
Chris Lattner
827efa451f
simplify some code
...
llvm-svn: 45642
2008-01-06 01:12:44 +00:00
Chris Lattner
ab3242fd46
rename CodegenDAGPatterns -> CodeGenDAGPatterns
...
llvm-svn: 45641
2008-01-06 01:10:31 +00:00
Chris Lattner
e59a3c79e5
split enum emission out from InstrInfoEmitter into it's own tblgen backend.
...
llvm-svn: 45640
2008-01-06 00:49:05 +00:00
Chris Lattner
78ac0747e7
fix build on case sensitive file systems.
...
llvm-svn: 45639
2008-01-05 23:37:52 +00:00
Bill Wendling
5fa2c64b78
Fix comment.
...
llvm-svn: 45638
2008-01-05 23:30:51 +00:00
Chris Lattner
7eac714b41
make this build with newer gcc's
...
llvm-svn: 45637
2008-01-05 23:29:51 +00:00
Chris Lattner
7980bba549
now that computing CodegenDAGPatterns doesn't implicitly print stuff
...
out, DAGISelEmitter can compute it in its ctor, which simplifies some code.
Now we can use CodegenDAGPatterns in other parts of tblgen that want access
to dag pattern info, woo!
llvm-svn: 45636
2008-01-05 22:58:54 +00:00
Chris Lattner
cc43e79bcd
move Node Transformation printing from CodeGenDAGPatterns -> DAGISelEmitter.
...
The only difference in output is that we now print them in alphabetical
order instead of reverse alphabetical order.
llvm-svn: 45635
2008-01-05 22:54:53 +00:00
Chris Lattner
e7170df043
move predicate printing code from CodeGenDAGPatterns -> DAGISelEmitter.
...
llvm-svn: 45634
2008-01-05 22:43:57 +00:00
Chris Lattner
9abe77b2d0
fix a fixme by improving const correctness.
...
llvm-svn: 45633
2008-01-05 22:30:17 +00:00
Chris Lattner
8cab021ca2
change getQualifiedName to be a global function.
...
Split the pattern parsing code out from the dag isel emitter into it's own file.
No functionality change.
llvm-svn: 45632
2008-01-05 22:25:12 +00:00
Nate Begeman
22950d26f5
Remove an incorrect optimization that is performed correctly by
...
the target independent legalizer.
llvm-svn: 45631
2008-01-05 20:51:30 +00:00
Nate Begeman
5743da502e
If custom lowering of insert element fails, the result Val will be 0.
...
Don't overwrite a variable used by the fallthrough code path in this
case.
llvm-svn: 45630
2008-01-05 20:47:37 +00:00
Chris Lattner
647e61a42b
Fix build issue on certain compilers.
...
llvm-svn: 45629
2008-01-05 20:15:42 +00:00
Gordon Henriksen
9231958391
Refactoring the x86 and x86-64 calling convention implementations,
...
unifying the copied algorithms and saving over 500 LOC. There should
be no functionality change, but please test on your favorite x86
target.
llvm-svn: 45627
2008-01-05 16:56:59 +00:00
Bill Wendling
be984cf10b
Chris and Evan noticed that this check was compleatly fubared. I was
...
checking that there was a from a global instead of a load from the stub
for a global, which is the one that's safe to hoist.
Consider this program:
volatile char G[100];
int B(char *F, int N) {
for (; N > 0; --N)
F[N] = G[N];
}
In static mode, we shouldn't be hoisting the load from G:
$ llc -relocation-model=static -o - a.bc -march=x86 -machine-licm
LBB1_1: # bb.preheader
leal -1(%eax), %edx
testl %edx, %edx
movl $1, %edx
cmovns %eax, %edx
xorl %esi, %esi
LBB1_2: # bb
movb _G(%eax), %bl
movb %bl, (%ecx,%eax)
llvm-svn: 45626
2008-01-05 09:18:04 +00:00
Chris Lattner
ee61d14bf6
The current impl is really trivial, add some comments about how it can be made better.
...
llvm-svn: 45625
2008-01-05 06:47:58 +00:00
Chris Lattner
276178e49f
allow sinking to be enabled for the jit
...
llvm-svn: 45624
2008-01-05 06:14:16 +00:00
Chris Lattner
e0f0c4aa02
enable sinking and licm of loads from the argument area. I'd like to enable this
...
for remat, but can't due to an RA bug.
llvm-svn: 45623
2008-01-05 06:10:42 +00:00
Chris Lattner
d4738ee8e1
simplify some code by using shorter accessors.
...
llvm-svn: 45622
2008-01-05 05:28:30 +00:00
Chris Lattner
86f4a2e4f2
revert my previous patch.
...
llvm-svn: 45621
2008-01-05 05:26:26 +00:00
Chris Lattner
69d7902cf1
factor some code better to avoid redundancy between
...
isReallySideEffectFree and isReallyTriviallyReMaterializable. Why is a load from
a global considered side-effect-free but not rematable?
llvm-svn: 45620
2008-01-05 05:19:56 +00:00
Chris Lattner
9fa8ae6c6b
getting the pic base has no side effects.
...
llvm-svn: 45618
2008-01-05 03:54:32 +00:00
Chris Lattner
d11ca169e7
don't sink anything with side effects, this makes lots of stuff work, but sinks almost nothing.
...
llvm-svn: 45617
2008-01-05 02:33:22 +00:00
Evan Cheng
880b080887
X86 JIT PIC jumptable support.
...
llvm-svn: 45616
2008-01-05 02:26:58 +00:00
Fariborz Jahanian
7b1b947ca1
twiks based on Chris's comment. No need to iterate thru a list of declarations
...
in a foreach-statement which is illegal (but not yet caught) .
llvm-svn: 45615
2008-01-05 01:40:08 +00:00
Chris Lattner
6ec78274df
fix a common crash.
...
llvm-svn: 45614
2008-01-05 01:39:17 +00:00
Chris Lattner
e666bc272d
remove a couple more unsafe xforms in the face of overflow.
...
llvm-svn: 45613
2008-01-05 01:22:42 +00:00
Chris Lattner
db026d703b
remove the (x-y) < 0 comparison xform, it miscompiles
...
things that are not equality comparisons, for example:
(2147479553+4096)-2147479553 < 0 != (2147479553+4096) < 2147479553
llvm-svn: 45612
2008-01-05 01:18:20 +00:00
Ted Kremenek
e84b32e506
Moved serialization code for ObjcForCollectionStmt to be in alphabetical order
...
with the rest of the Objective-C serialization code.
llvm-svn: 45609
2008-01-05 00:57:49 +00:00
Owen Anderson
3592b2352d
I should not be allowed to commit when sleepy.
...
llvm-svn: 45608
2008-01-05 00:48:55 +00:00
Owen Anderson
1984732f22
Didn't mean to commit this.
...
llvm-svn: 45607
2008-01-05 00:43:37 +00:00
Owen Anderson
cc35708bac
Didn't mean to commit this.
...
llvm-svn: 45606
2008-01-05 00:42:45 +00:00
Evan Cheng
f55b7381af
Combine MovePCtoStack + POP32r into one instruction MOVPC32r so it can be moved if needed.
...
llvm-svn: 45605
2008-01-05 00:41:47 +00:00
Fariborz Jahanian
bad3218954
Minor refactoring of foreach's semantics code per Chris's suggetion.
...
llvm-svn: 45604
2008-01-04 23:59:09 +00:00
Owen Anderson
6bb0c52628
Move some more functionality from MRegisterInfo to TargetInstrInfo.
...
llvm-svn: 45603
2008-01-04 23:57:37 +00:00
Chris Lattner
881a212a70
unnest vector handling again.
...
llvm-svn: 45602
2008-01-04 23:32:24 +00:00
Fariborz Jahanian
e908cab389
Added a comment, minor refactoring of foreach parsing code per Chris's suggestion.
...
llvm-svn: 45601
2008-01-04 23:23:46 +00:00
Chris Lattner
f735409e11
we already test for exact type matches early, so we don't have to do
...
it explicitly for vectors. This allows us to unnest some code.
llvm-svn: 45600
2008-01-04 23:20:56 +00:00
Chris Lattner
a52c2f2e3e
simplify some of this code by removing the else/if chain and by
...
stripping down to canonical types early.
llvm-svn: 45599
2008-01-04 23:18:45 +00:00
Fariborz Jahanian
3622e5954b
Minor changes as suggested by Chris L.
...
llvm-svn: 45598
2008-01-04 23:04:08 +00:00
Chris Lattner
a3fc41d616
move objc expr sema to its own file.
...
llvm-svn: 45597
2008-01-04 22:32:30 +00:00
Bill Wendling
0c209430b4
Don't recalculate the loop info and loop dominators analyses if they're
...
preserved.
llvm-svn: 45596
2008-01-04 20:54:55 +00:00
Wojciech Matyjewicz
2bd541c5ff
fix typo
...
llvm-svn: 45595
2008-01-04 20:04:08 +00:00
Wojciech Matyjewicz
30e434569e
fix typo
...
llvm-svn: 45594
2008-01-04 20:02:18 +00:00
Chris Lattner
4899a6aa6a
Fix PR1897, patch by Wilhansen Li
...
llvm-svn: 45593
2008-01-04 19:12:28 +00:00
Chris Lattner
940cfebf90
add comments for the various AssignConvertType's, and split int->pointer from pointer->int.
...
llvm-svn: 45591
2008-01-04 18:22:42 +00:00
Chris Lattner
9bad62c72a
Merge all the 'assignment' diagnostic code into one routine, decloning
...
it from several places. This merges the diagnostics, making them more
uniform and fewer in number. This also simplifies and cleans up the code.
Some highlights:
1. This removes a bunch of very-similar diagnostics.
2. This renames AssignmentCheckResult -> AssignConvertType
3. This merges PointerFromInt + IntFromPointer which were always treated the same.
4. This updates a bunch of test cases that have minor changes to the produced diagnostics.
llvm-svn: 45589
2008-01-04 18:04:52 +00:00
Duncan Sands
d98c63ebb9
Testcase with non-integer "bitfields" (in quotes,
...
since they didn't actually need to be bitfields,
though they are marked as such).
llvm-svn: 45588
2008-01-04 17:31:56 +00:00
Chris Lattner
94cf8061e7
fix a build problem where NULL isn't implicitly defined by the headers this file includes.
...
llvm-svn: 45587
2008-01-04 16:27:03 +00:00
Gordon Henriksen
d829d2efeb
Fix a typo in llvm.mli noticed by Alain Frisch.
...
llvm-svn: 45585
2008-01-04 13:21:02 +00:00
Duncan Sands
99fc7197f2
Testcase for PR1386.
...
llvm-svn: 45583
2008-01-04 13:15:39 +00:00
Bill Wendling
46813c58bb
doc_code-ify some code in this doc.
...
llvm-svn: 45581
2008-01-04 12:04:32 +00:00
Gordon Henriksen
73d8967f02
Quote a path in the Ocaml makefile which is likely to include spaces on Windows.
...
llvm-svn: 45580
2008-01-04 11:55:57 +00:00
Evan Cheng
c1d1e54fc4
Unbreak tailcall opt in JIT.
...
llvm-svn: 45576
2008-01-04 10:50:28 +00:00
Evan Cheng
49ff8ecd03
X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
...
llvm-svn: 45575
2008-01-04 10:46:51 +00:00
Bill Wendling
118ae4cd61
80-column violations.
...
llvm-svn: 45574
2008-01-04 08:59:18 +00:00
Bill Wendling
3bf5603ce4
Add that this preserves some analyses.
...
llvm-svn: 45573
2008-01-04 08:48:49 +00:00
Bill Wendling
66470d02c3
Move option to enable machine LICM into LLVMTargetMachine.cpp.
...
llvm-svn: 45572
2008-01-04 08:11:03 +00:00
Bill Wendling
d865697016
Call the parent's getAnalysisUsage.
...
llvm-svn: 45571
2008-01-04 07:50:05 +00:00
Chris Lattner
f3edc09f9b
Add a really quick hack at a machine code sinking pass, enabled with --enable-sinking.
...
It is missing validity checks, so it is known broken. However, it is powerful enough
to compile this contrived code:
void test1(int C, double A, double B, double *P) {
double Tmp = A*A+B*B;
*P = C ? Tmp : A;
}
into:
_test1:
movsd 8(%esp), %xmm0
cmpl $0, 4(%esp)
je LBB1_2 # entry
LBB1_1: # entry
movsd 16(%esp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
LBB1_2: # entry
movl 24(%esp), %eax
movsd %xmm0, (%eax)
ret
instead of:
_test1:
movsd 16(%esp), %xmm0
mulsd %xmm0, %xmm0
movsd 8(%esp), %xmm1
movapd %xmm1, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
cmpl $0, 4(%esp)
je LBB1_2 # entry
LBB1_1: # entry
movapd %xmm2, %xmm1
LBB1_2: # entry
movl 24(%esp), %eax
movsd %xmm1, (%eax)
ret
woo.
llvm-svn: 45570
2008-01-04 07:36:53 +00:00
Chris Lattner
b5c1d9b7da
remove dead #includes and reorder the rest.
...
llvm-svn: 45569
2008-01-04 06:41:45 +00:00
Chris Lattner
bdd6acfb59
Fix PR1896
...
llvm-svn: 45568
2008-01-04 05:04:53 +00:00
Chris Lattner
69ea01446e
Change the builtin matcher to emit a decision tree, which should help out
...
the VC++ 'nesting depth' issue.
llvm-svn: 45567
2008-01-04 04:38:35 +00:00
Chris Lattner
43542b3a93
fix nesting issues.
...
llvm-svn: 45566
2008-01-04 04:34:14 +00:00
Chris Lattner
b8f816e90d
fix validation issues.
...
llvm-svn: 45565
2008-01-04 04:33:49 +00:00
Chris Lattner
7824d182da
improve the description of types, patch by Alain Frisch
...
llvm-svn: 45564
2008-01-04 04:32:38 +00:00
Chris Lattner
a47634ecb1
Don't let IntrinsicID be uninitialized if it doesn't match.
...
llvm-svn: 45563
2008-01-04 03:32:52 +00:00
Evan Cheng
2e1ba07f16
Correct order of parameters.
...
llvm-svn: 45562
2008-01-04 02:22:21 +00:00
Fariborz Jahanian
775d5d02af
Patch to add semantics check for ObjC2's foreacn statement.
...
llvm-svn: 45561
2008-01-04 00:27:46 +00:00
Chris Lattner
816dea2fc5
generalize some of the conversion warnings.
...
llvm-svn: 45560
2008-01-03 23:38:43 +00:00
Chris Lattner
166ae81be1
update for changes in diagnostic strings.
...
llvm-svn: 45559
2008-01-03 23:36:08 +00:00
Chris Lattner
874e024f10
regroup assignment-related diagnostics, fix a mistake in one.
...
llvm-svn: 45558
2008-01-03 23:13:36 +00:00
Bill Wendling
ddc77f8e4c
Remove the default else. This was ending in code that looked like this:
...
if (!strcmp(Target, "x86")) {
// ...
}
else
IntrinsicID = Intrinsic::not_intrinsic;
llvm-svn: 45557
2008-01-03 23:02:16 +00:00
Chris Lattner
0a788433eb
give better diagnostics for converting between function pointer and void*.
...
llvm-svn: 45556
2008-01-03 22:56:36 +00:00
Ted Kremenek
739d350369
renamed class "GRCP" (Graph Reachabilty Constant Propagation) to
...
"GREngine" (Graph Reachability Engine). The idea is to provide a separation
of concerns between the constant prop. details and the core analysis engine.
llvm-svn: 45555
2008-01-03 22:46:25 +00:00
Ted Kremenek
7c54e520e7
Implemented End-Of-Path processing.
...
llvm-svn: 45554
2008-01-03 22:29:38 +00:00
Chris Lattner
84cea329d5
Remove symbols that don't exist, remove tabs, fix comment typo
...
llvm-svn: 45553
2008-01-03 22:15:32 +00:00
Ted Kremenek
0044908de0
Initial checking of GRConstantPropagation.cpp, which implements a constant
...
propagation analysis via graph reachability. This analysis (which is incomplete)
will be the basis for later developments on the core engine for path-sensitive
analysis analysis.
llvm-svn: 45552
2008-01-03 22:12:28 +00:00
Ted Kremenek
fde239df06
Fixed misuse of pointer within SimulVertex::addPredecessor()
...
llvm-svn: 45551
2008-01-03 22:09:27 +00:00
Ted Kremenek
9d375282cf
SimulGraph::getVertex() now also returns a bool indicating if the returned
...
vertex was freshly created.
llvm-svn: 45550
2008-01-03 22:08:52 +00:00
Ted Kremenek
6abe02ada6
Constified methods front() and back() in CFGBlock.
...
llvm-svn: 45549
2008-01-03 22:07:58 +00:00
Ted Kremenek
d6c30e58e2
De-constified the pointers returned by the Dst() and Src() methods of
...
the various ProgramEdge classes.
llvm-svn: 45548
2008-01-03 22:07:01 +00:00
Fariborz Jahanian
c89ea091a2
Couple more uninitialized before use warning elimination.
...
llvm-svn: 45547
2008-01-03 20:04:58 +00:00
Fariborz Jahanian
243c611a05
Remove cause of misc. "variable might be used uninitialized in this function" warnings.
...
llvm-svn: 45546
2008-01-03 20:01:35 +00:00
Chuck Rose III
7f2e31a36a
Adding new files to win32 build
...
llvm-svn: 45545
2008-01-03 19:53:03 +00:00
Fariborz Jahanian
5cc21a7e02
Fixed a bug reported by Chris, involving assiging 0 to a qualified object type.
...
llvm-svn: 45542
2008-01-03 18:46:52 +00:00
Chris Lattner
2b15cf705b
simplify the lexer a bit, pulling stuff out of the default case.
...
llvm-svn: 45540
2008-01-03 17:58:54 +00:00
Fariborz Jahanian
732b8c2dc5
Patch to parse/build AST ObjC2's foreach statement.
...
llvm-svn: 45539
2008-01-03 17:55:25 +00:00
Gordon Henriksen
9b92e93d36
Ignoring output files.
...
llvm-svn: 45538
2008-01-03 17:42:08 +00:00
Chris Lattner
67793d8d60
add info on walking preds/succs of a block.
...
llvm-svn: 45537
2008-01-03 16:56:04 +00:00
Gordon Henriksen
f066fc477c
First steps in in X86 calling convention cleanup.
...
llvm-svn: 45536
2008-01-03 16:47:34 +00:00
Duncan Sands
338b462b6f
Test for handling of large bit offset from a
...
variable field offset.
llvm-svn: 45534
2008-01-03 11:53:52 +00:00
Chris Lattner
f391883670
don't hoist FP additions into unconditional adds + selects. This
...
could theoretically introduce a trap, but is also a performance issue.
This speeds up ptrdist/ks by 8%.
llvm-svn: 45533
2008-01-03 07:25:26 +00:00
Chris Lattner
705dc51f2c
Fix PR1873, a problem finding stat-related symbols on linux, due to
...
"libc_nonshared.a". Patch by Edwin Török!
llvm-svn: 45532
2008-01-03 07:10:51 +00:00
Chris Lattner
1800c18ebd
fix long lines.
...
llvm-svn: 45531
2008-01-03 07:05:49 +00:00
Chris Lattner
20455f204f
Fix a crash reported by Seo Sanghyeon.
...
llvm-svn: 45530
2008-01-03 06:36:51 +00:00
Gordon Henriksen
7c87884ec3
Trying that again.
...
llvm-svn: 45529
2008-01-03 03:32:33 +00:00
Gordon Henriksen
8624d7b72e
Fix a compile error on Windows.
...
llvm-svn: 45528
2008-01-03 03:21:18 +00:00
Evan Cheng
563fcc3428
Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be used
...
for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode).
llvm-svn: 45527
2008-01-03 02:56:28 +00:00
Chris Lattner
e35604ddb2
don't access element zero of an array of size zero.
...
llvm-svn: 45526
2008-01-03 01:25:31 +00:00
Chris Lattner
76719ba5f1
Remove the function attr cache for intrinsics. This does not maintain the
...
refcount on these correctly, and can end up referring to deleted
attributes. This fixes PR1881.
llvm-svn: 45525
2008-01-03 01:20:12 +00:00
Chris Lattner
b18b0b99c6
Don't create a new ParamAttrsList (which copies the vector) just to
...
get a profile.
llvm-svn: 45524
2008-01-03 00:29:27 +00:00
Duncan Sands
a7f7ac7072
An example for which the TYPE_SIZE was being set from
...
the initial value, while the type fields were not (this
is a qualified union type, so not all fields are always
present). This resulted in the size of the corresponding
LLVM type being larger than the gcc TYPE_SIZE.
llvm-svn: 45522
2008-01-03 00:26:42 +00:00
Duncan Sands
1d03fb4e7e
Test handling of records for which the fields are
...
not ordered by offset.
llvm-svn: 45520
2008-01-03 00:17:02 +00:00
Chris Lattner
d0e1f10078
move some code out of line, rearrange a bit.
...
llvm-svn: 45519
2008-01-03 00:10:22 +00:00
Chris Lattner
d135068e53
Disallow copying explicitly.
...
llvm-svn: 45518
2008-01-03 00:09:47 +00:00
Chris Lattner
3e13b8c173
Split param attr implementation out from Function.cpp into its
...
own file. Don't #include ParameterAttributes.h into any major
public header files: just move methods out of line as appropriate.
llvm-svn: 45517
2008-01-02 23:42:30 +00:00
Chris Lattner
d2b0e15535
add missing #include
...
llvm-svn: 45516
2008-01-02 23:41:05 +00:00
Evan Cheng
96334b4e3b
X86 PIC JIT bug fix: relocations for constantpool and jumptable.
...
llvm-svn: 45515
2008-01-02 23:38:59 +00:00
Chris Lattner
04cd35f88b
remove blob of #if'd out code.
...
llvm-svn: 45512
2008-01-02 23:10:45 +00:00
Fariborz Jahanian
8361552af9
New declarations/defs for Objc2's foreach-statement. This is work in progress.
...
llvm-svn: 45511
2008-01-02 22:54:34 +00:00
Chris Lattner
4f20351142
When promoting array to pointer for argument, don't lose type qualifiers.
...
llvm-svn: 45510
2008-01-02 22:50:48 +00:00
Chris Lattner
41e423a6f5
fix this to use a valid triple.
...
llvm-svn: 45509
2008-01-02 22:21:45 +00:00
Ted Kremenek
161807f8d1
SimulVertex: Inverted argument order when calling the Profile method of StateTy.
...
SimulGraph: Inverted argument order when calling the Profile method of VertexTy
(plus minor cleanups)
llvm-svn: 45508
2008-01-02 22:20:20 +00:00
Ted Kremenek
a26f5d188f
Inverted argument order for ImmutableMap::Profile.
...
llvm-svn: 45507
2008-01-02 22:18:33 +00:00
Chris Lattner
0acc15c470
Fix a build issue on cygwin
...
llvm-svn: 45506
2008-01-02 22:03:27 +00:00
Chris Lattner
7977cca8e8
Fix PR1895: a crash on an ugly gcc extension.
...
llvm-svn: 45505
2008-01-02 21:54:09 +00:00
Chris Lattner
266a2ff3ac
Compute the proper sourcerange for an CompoundLiteralExpr.
...
llvm-svn: 45504
2008-01-02 21:46:24 +00:00
Ted Kremenek
d7c6b0e664
Added iterator and profiling (i.e. FoldingSetNodeID) support to ImmutableMap.
...
llvm-svn: 45503
2008-01-02 21:31:48 +00:00
Ted Kremenek
c7523bcaaa
Converted state reference within SimulVertex from StateTy* to StateTy.
...
This is more flexible.
llvm-svn: 45502
2008-01-02 21:31:13 +00:00
Chris Lattner
9a6774064b
Fix PR1888, patch by Wilhansen Li.
...
llvm-svn: 45501
2008-01-02 21:30:58 +00:00
Chris Lattner
91678fc457
Fix a build problem with VC++ by not doing the target prefix
...
comparison for every builtin. This reduces the depth of
the if/elseif chain dramatically.
llvm-svn: 45500
2008-01-02 21:24:22 +00:00
Bill Wendling
0ba4184404
Use the correct MachineRegisterInfo object.
...
llvm-svn: 45499
2008-01-02 21:10:54 +00:00
Bill Wendling
e1f28e7871
Machine LICM will check that operands are defined outside of the loop. Also
...
check that register isn't 0 before going further.
llvm-svn: 45498
2008-01-02 21:10:40 +00:00
Chris Lattner
54bb810997
Refactor the decl printer, patch by Mike Stump!
...
llvm-svn: 45497
2008-01-02 21:04:16 +00:00
Bill Wendling
f0b37780ca
Remove dead code.
...
llvm-svn: 45496
2008-01-02 20:47:37 +00:00
Chris Lattner
5d998c5712
verify that aligned common support doesn't break.
...
llvm-svn: 45495
2008-01-02 19:48:24 +00:00
Chris Lattner
cce79c67ca
darwin9 and above support aligned common symbols.
...
llvm-svn: 45494
2008-01-02 19:44:55 +00:00
Chris Lattner
dcbc0f3029
leopard and above support alignment for common symbols.
...
llvm-svn: 45493
2008-01-02 19:35:16 +00:00
Bill Wendling
5da1945cdd
Use the new architecture to get the containing machine basic block for a machine
...
instruction. Also, use "splice" to move the new instruction instead of
remove/insert (where it was leaking memory anyway).
llvm-svn: 45492
2008-01-02 19:32:43 +00:00
Fariborz Jahanian
056e3a4e90
Issue diagnostic when objective-c's @interface is preceeded by a type specifier.
...
llvm-svn: 45491
2008-01-02 19:17:38 +00:00
Ted Kremenek
796b64337b
Added/fixed some comments.
...
llvm-svn: 45490
2008-01-02 18:31:49 +00:00
Fariborz Jahanian
5e57e1890d
Prevent crash on incorrect objc messaging expression.
...
llvm-svn: 45489
2008-01-02 18:09:46 +00:00
Ted Kremenek
dc8ebe5022
Sprinkled 'typename' and fixed a few typos and type declaration errors to
...
make these headers compile.
llvm-svn: 45488
2008-01-02 17:45:00 +00:00
Ted Kremenek
2290828271
Added fixme.
...
llvm-svn: 45487
2008-01-02 17:05:47 +00:00
Ted Kremenek
032cb4433e
Allocate vertices using a BumpPtrAllocator.
...
llvm-svn: 45486
2008-01-02 17:00:32 +00:00
Nick Lewycky
d1200b00dc
Don't be rude, emit debugging info where asked to.
...
llvm-svn: 45485
2008-01-02 02:49:20 +00:00
Owen Anderson
eee14601b1
Move some more instruction creation methods from RegisterInfo into InstrInfo.
...
llvm-svn: 45484
2008-01-01 21:11:32 +00:00
Chris Lattner
caaf8aae4d
Make MachineRegisterInfo::getVRegDef more efficient by aiming the keep the def of the vreg at the start of the list, so the list doesn't need to be traversed.
...
llvm-svn: 45483
2008-01-01 21:08:22 +00:00
Chris Lattner
0cb9dd7aa2
switch the register iterator to act more like hte LLVM value iterator: dereferencing
...
it now returns the machineinstr of the use. To get the operand, use I.getOperand().
Add a new MachineRegisterInfo::replaceRegWith, which is basically like
Value::replaceAllUsesWith.
llvm-svn: 45482
2008-01-01 20:36:19 +00:00
Gordon Henriksen
097102c32a
Adding C bindings for SwitchInst::addCase.
...
Patch by Bryan O'Sullivan!
llvm-svn: 45481
2008-01-01 05:50:53 +00:00
Chris Lattner
39204d76c5
Add a trivial but handy function to efficiently return the machine
...
instruction that defines the specified vreg. Crazy.
llvm-svn: 45480
2008-01-01 03:07:29 +00:00
Chris Lattner
8a497053a7
add efficient iteration support for register use/def's
...
within a machine function.
llvm-svn: 45479
2008-01-01 02:55:32 +00:00
Bill Wendling
6f8c9a8372
Update this testcase. The output needs to be disabled to pass.
...
llvm-svn: 45478
2008-01-01 01:34:36 +00:00
Chris Lattner
961e7427ea
Implement automatically updated def/use lists for all MachineInstr register
...
operands. The lists are currently kept in MachineRegisterInfo, but it does
not yet provide an iterator interface to them.
llvm-svn: 45477
2008-01-01 01:12:31 +00:00
Chris Lattner
b0fb17fd34
Fix a bug in my previous patch: refer to the impl not the pure virtual version. It's unclear why gcc would ever compile this...
...
llvm-svn: 45476
2008-01-01 01:05:34 +00:00
Chris Lattner
25568e4cef
Fix a problem where lib/Target/TargetInstrInfo.h would include and use
...
a header file from libcodegen. This violates a layering order: codegen
depends on target, not the other way around. The fix to this is to
split TII into two classes, TII and TargetInstrInfoImpl, which defines
stuff that depends on libcodegen. It is defined in libcodegen, where
the base is not.
llvm-svn: 45475
2008-01-01 01:03:04 +00:00
Chris Lattner
c23e6351de
Factor out makefile dependency generation better.
...
Don't include system headers in the .d files.
Don't use $@ in the makefile rules, as there are two possible targets it could resolve to: use the one that we need explicitly.
llvm-svn: 45473
2007-12-31 23:58:31 +00:00
Duncan Sands
57a60f0466
Fix PR1833 - eh.exception and eh.selector return two
...
values, which means doing extra legalization work.
It would be easier to get this kind of thing right if
there was some documentation...
llvm-svn: 45472
2007-12-31 18:35:50 +00:00
Owen Anderson
7a73ae9a86
Move copyRegToReg from MRegisterInfo to TargetInstrInfo. This is part of the
...
Machine-level API cleanup instigated by Chris.
llvm-svn: 45470
2007-12-31 06:32:00 +00:00
Chris Lattner
574e7166e0
properly encapsulate the parent field of MBB and MI with get/set accessors.
...
llvm-svn: 45469
2007-12-31 04:56:33 +00:00
Chris Lattner
21ec2b4769
update a couple of references to SSARegMap.
...
llvm-svn: 45468
2007-12-31 04:16:08 +00:00
Chris Lattner
a10fff51d9
Rename SSARegMap -> MachineRegisterInfo in keeping with the idea
...
that "machine" classes are used to represent the current state of
the code being compiled. Given this expanded name, we can start
moving other stuff into it. For now, move the UsedPhysRegs and
LiveIn/LoveOuts vectors from MachineFunction into it.
Update all the clients to match.
This also reduces some needless #includes, such as MachineModuleInfo
from MachineFunction.
llvm-svn: 45467
2007-12-31 04:13:23 +00:00
Gordon Henriksen
1f35454e99
Removing obsolete files from the Xcode project.
...
llvm-svn: 45466
2007-12-31 01:45:55 +00:00
Chris Lattner
5a1d88e91b
slightly simplify and document SSARegMap.
...
llvm-svn: 45465
2007-12-30 23:40:31 +00:00
Chris Lattner
a5bb370aa4
Add new shorter predicates for testing machine operands for various types:
...
e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on
switching everything over, so new clients should just start using the
shorter names.
Remove old long accessors, switching everything over to use the short
accessor: getMachineBasicBlock() -> getMBB(),
getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc.
llvm-svn: 45464
2007-12-30 23:10:15 +00:00
Gordon Henriksen
1862b6daa0
Another backwards compatibility fix.
...
llvm-svn: 45463
2007-12-30 22:48:58 +00:00
Chris Lattner
db64f04ac6
- rename opType -> OpKind and contents -> Contents.
...
- eliminate the auxInfo union, merging it into the contents union. This shaves
4 bytes off MachineOperand on a 32-bit machine.
- Use accessors in ctor methods.
- Add comments.
llvm-svn: 45462
2007-12-30 22:24:06 +00:00
Chris Lattner
6005589faf
More cleanups for MachineOperand:
...
- Eliminate the static "print" method for operands, moving it
into MachineOperand::print.
- Change various set* methods for register flags to take a bool
for the value to set it to. Remove unset* methods.
- Group methods more logically by operand flavor in MachineOperand.h
llvm-svn: 45461
2007-12-30 21:56:09 +00:00
Chris Lattner
c98c0e57eb
MachineOperand:
...
- Add getParent() accessors.
- Move SubReg out of the AuxInfo union, to make way for future changes.
- Remove the getImmedValue/setImmedValue methods.
- in some MachineOperand::Create* methods, stop initializing fields that are dead.
MachineInstr:
- Delete one copy of the MachineInstr printing code, now there is only one dump
format and one copy of the code.
- Make MachineOperand use the parent field to get info about preg register names if
no target info is otherwise available.
- Move def/use/kill/dead flag printing to the machineoperand printer, so they are
always printed for an operand.
llvm-svn: 45460
2007-12-30 21:31:53 +00:00
Chris Lattner
96317d2412
fix typo duncan noticed!
...
llvm-svn: 45459
2007-12-30 21:21:10 +00:00
Chris Lattner
35fececec9
simpilfy some register printing code.
...
llvm-svn: 45458
2007-12-30 21:08:36 +00:00
Chris Lattner
383a873a9a
eliminate a copy of the machineoperand printing stuff. Keep the copy that
...
knows how to print offsets.
llvm-svn: 45457
2007-12-30 21:03:30 +00:00
Chris Lattner
49bd29daa0
Simplify and clean up some machine operand/instr printing/dumping stuff.
...
llvm-svn: 45456
2007-12-30 21:01:27 +00:00
Chris Lattner
0dad74d252
two register machineoperands are not identical unless their subregs match.
...
llvm-svn: 45455
2007-12-30 20:55:08 +00:00
Chris Lattner
81798417dc
MachineOperand::getImmedValue -> MachineOperand::getImm
...
llvm-svn: 45454
2007-12-30 20:50:28 +00:00
Chris Lattner
5c4637816e
Use MachineOperand::getImm instead of MachineOperand::getImmedValue. Likewise setImmedValue -> setImm
...
llvm-svn: 45453
2007-12-30 20:49:49 +00:00
Gordon Henriksen
86427bb2a9
Trying r45451 again, but this time warning-free on 3.10.x.
...
llvm-svn: 45452
2007-12-30 18:12:41 +00:00
Gordon Henriksen
8100a225c0
Remove some lines that are nonportable to Ocaml 3.06.
...
llvm-svn: 45451
2007-12-30 17:48:11 +00:00
Gordon Henriksen
4a4d73519e
Add some doxygen comments to llvm-c/Core.h.
...
llvm-svn: 45450
2007-12-30 17:46:33 +00:00
Chris Lattner
3c6ce5b43c
make machine operands fatter: give each one an up-pointer to the
...
machineinstr that owns it.
llvm-svn: 45449
2007-12-30 06:11:04 +00:00
Gordon Henriksen
12c53c8c84
Strengthening this test so it fails in release mode.
...
llvm-svn: 45446
2007-12-30 05:45:49 +00:00
Chris Lattner
ad0c83d65e
split machineoperand out into its own header file.
...
llvm-svn: 45445
2007-12-30 04:40:25 +00:00
Bill Wendling
7749a9014b
If we have a load of a global address that's not modified during the
...
function, then go ahead and hoist it out of the loop. This is the result:
$ cat a.c
volatile int G;
int A(int N) {
for (; N > 0; --N)
G++;
}
$ llc -o - -relocation-model=pic
_A:
...
LBB1_2: # bb
movl L_G$non_lazy_ptr-"L1$pb"(%eax), %esi
incl (%esi)
incl %edx
cmpl %ecx, %edx
jne LBB1_2 # bb
...
$ llc -o - -relocation-model=pic -machine-licm
_A:
...
movl L_G$non_lazy_ptr-"L1$pb"(%eax), %eax
LBB1_2: # bb
incl (%eax)
incl %edx
cmpl %ecx, %edx
jne LBB1_2 # bb
...
I'm limiting this to the MOV32rm x86 instruction for now.
llvm-svn: 45444
2007-12-30 03:18:58 +00:00
Nate Begeman
330aaa79e0
Allow implicit casts during arithmetic for OCUVector operations
...
Add codegen support and test for said casts.
llvm-svn: 45443
2007-12-30 02:59:45 +00:00
Nate Begeman
627daba0fd
Allow splat casts for OCU vector assignments & add some comments.
...
llvm-svn: 45442
2007-12-30 01:45:55 +00:00
Nate Begeman
16a3a9d5f9
Rename stats to print-stats to avoid conflicting with llvm's
...
stats statistic when clang is built as a dylib.
llvm-svn: 45441
2007-12-30 01:38:50 +00:00
Nate Begeman
628028bd27
Allow codegen of vector fdiv
...
llvm-svn: 45440
2007-12-30 01:28:16 +00:00
Chris Lattner
add4b3f9ab
remove unneeded #includes.
...
llvm-svn: 45439
2007-12-30 01:11:43 +00:00
Chris Lattner
79f6f6c87a
remove a bunch of now-dead methods.
...
llvm-svn: 45438
2007-12-30 01:04:05 +00:00
Chris Lattner
b3fd2d7b63
use simplified operand addition methods.
...
llvm-svn: 45437
2007-12-30 01:01:54 +00:00
Chris Lattner
20421fe936
use simplified operand addition methods.
...
llvm-svn: 45436
2007-12-30 00:57:42 +00:00
Chris Lattner
bbbae8e1ce
use simplified operand addition methods.
...
llvm-svn: 45435
2007-12-30 00:51:11 +00:00
Chris Lattner
b65293a075
make offset operand optional.
...
llvm-svn: 45434
2007-12-30 00:50:55 +00:00
Chris Lattner
4b762496a9
Shrinkify the machine operand creation method names.
...
llvm-svn: 45433
2007-12-30 00:45:46 +00:00
Chris Lattner
e35dfb827f
Start using the simplified methods for adding operands.
...
llvm-svn: 45432
2007-12-30 00:41:17 +00:00
Chris Lattner
c002be7fdd
switch MIBuilder over to use the simplified operand addition methods.
...
llvm-svn: 45431
2007-12-30 00:35:18 +00:00
Chris Lattner
d948c2d244
1. Make a static MachineOperand::create* method for every
...
operand type.
2. Move these create methods below the accessors.
3. Simplify all the MachineInstr::add* methods to use these.
llvm-svn: 45430
2007-12-30 00:29:19 +00:00
Chris Lattner
dc3c9050f8
tblgen shouldn't include headers from llvm codegen.
...
llvm-svn: 45429
2007-12-30 00:25:23 +00:00
Chris Lattner
c288ff1d78
simplify some code by factoring operand construction better.
...
llvm-svn: 45428
2007-12-30 00:12:25 +00:00
Chris Lattner
a77acbdcae
implement codegen support for most unary operators when
...
initializing a global. This handles important cases like:
float foo3 = -0.01f;
llvm-svn: 45427
2007-12-29 23:43:37 +00:00
Chris Lattner
6787a45a65
remove attribution from a variety of miscellaneous files.
...
llvm-svn: 45425
2007-12-29 22:59:10 +00:00
Chris Lattner
f87b59d683
regenerate
...
llvm-svn: 45424
2007-12-29 20:47:37 +00:00
Chris Lattner
cb1e357a1c
remove attributions
...
llvm-svn: 45423
2007-12-29 20:46:15 +00:00
Gordon Henriksen
1158c533f7
Bindings for instruction calling conventions.
...
llvm-svn: 45422
2007-12-29 20:45:00 +00:00
Chris Lattner
345353d6b4
remove attributions from tools.
...
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Chris Lattner
bcf65db6f3
remove attributions from examples.
...
llvm-svn: 45420
2007-12-29 20:37:57 +00:00
Chris Lattner
8adcd9f32e
remove attributions from utils.
...
llvm-svn: 45419
2007-12-29 20:37:13 +00:00
Chris Lattner
f3ebc3f3d2
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
11cc8b3c14
remove attributions from the rest of the llvm makefiles.
...
llvm-svn: 45416
2007-12-29 20:11:13 +00:00
Chris Lattner
a087a8d2ce
remove attribution from lib Makefiles.
...
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Chris Lattner
8fa21acd25
remove attributions from tools/utils makefiles.
...
llvm-svn: 45414
2007-12-29 20:07:17 +00:00
Chris Lattner
7429581c33
remove attributions from .def files.
...
llvm-svn: 45413
2007-12-29 20:03:32 +00:00
Chris Lattner
5926c0ebfb
remove attribution from makefiles.
...
llvm-svn: 45412
2007-12-29 20:02:25 +00:00
Chris Lattner
e9cc742a17
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change. Boy are my fingers tired. ;-)
llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Chris Lattner
5b12ab8c93
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change.
llvm-svn: 45410
2007-12-29 19:59:25 +00:00
Chris Lattner
ebf5666abf
Don't attribute in file headers anymore. See llvmdev for the
...
discussion of this change.
llvm-svn: 45409
2007-12-29 19:56:08 +00:00
Chris Lattner
4e6cbb2fe2
this is done.
...
llvm-svn: 45408
2007-12-29 19:38:02 +00:00
Chris Lattner
d2b8a36f0e
One readme entry is done, one is really easy (Evan, want to investigate
...
eliminating the llvm.x86.sse2.loadl.pd intrinsic?), one shuffle optzn
may be done (if shufps is better than pinsw, Evan, please review), and
we already know about LICM of simple instructions.
llvm-svn: 45407
2007-12-29 19:31:47 +00:00
Chris Lattner
0d90c8f016
upgrade this test
...
llvm-svn: 45406
2007-12-29 19:24:06 +00:00
Chris Lattner
3b6a82118b
Fold comparisons against a constant nan, and optimize ORD/UNORD
...
comparisons with a constant. This allows us to compile isnan to:
_foo:
fcmpu cr7, f1, f1
mfcr r2
rlwinm r3, r2, 0, 31, 31
blr
instead of:
LCPI1_0: ; float
.space 4
_foo:
lis r2, ha16(LCPI1_0)
lfs f0, lo16(LCPI1_0)(r2)
fcmpu cr7, f1, f0
mfcr r2
rlwinm r3, r2, 0, 31, 31
blr
llvm-svn: 45405
2007-12-29 08:37:08 +00:00
Chris Lattner
33de0c6e92
this xform is implemented.
...
llvm-svn: 45404
2007-12-29 08:19:39 +00:00
Christopher Lamb
b053b80b79
Disable null pointer folding transforms for non-generic address spaces. This should probably be a target-specific predicate based on address space. That way for targets where this isn't applicable the predicate can be optimized away.
...
llvm-svn: 45403
2007-12-29 07:56:53 +00:00
Chris Lattner
2de9b85297
make sure not to zap volatile stores, thanks a lot to Dale for noticing this!
...
llvm-svn: 45402
2007-12-29 07:15:45 +00:00
Chris Lattner
07ccbfa64a
Codegen:
...
as:
_bar:
pushl %esi
subl $8, %esp
movl 16(%esp), %esi
call L_foo$stub
fstps (%esi)
addl $8, %esp
popl %esi
#FP_REG_KILL
ret
instead of:
_bar:
pushl %esi
subl $8, %esp
movl 16(%esp), %esi
call L_foo$stub
fstpl (%esi)
cvtsd2ss (%esi), %xmm0
movss %xmm0, (%esi)
addl $8, %esp
popl %esi
#FP_REG_KILL
ret
llvm-svn: 45401
2007-12-29 06:57:38 +00:00
Chris Lattner
5919b48fe9
don't fold fp_round(fp_extend(load)) -> fp_round(extload)
...
llvm-svn: 45400
2007-12-29 06:55:23 +00:00
Chris Lattner
8013bd339b
avoid going through a stack slot to convert from fpstack to xmm reg
...
if we are just going to store it back anyway. This improves things
like:
double foo();
void bar(double *P) { *P = foo(); }
llvm-svn: 45399
2007-12-29 06:41:28 +00:00
Chris Lattner
3f9c6a7260
Delete a store whose input is a load from the same pointer:
...
x = load p
store x -> p
llvm-svn: 45398
2007-12-29 06:26:16 +00:00
Chris Lattner
62ba67c0f7
add a note
...
llvm-svn: 45397
2007-12-29 05:51:58 +00:00
Christopher Lamb
c5fafa211a
Fix OCUVector case in struct layout code.
...
llvm-svn: 45396
2007-12-29 05:10:55 +00:00
Christopher Lamb
d91c3d4926
Enable CodeGen for member expressions based on call expressions returning aggregate types. This enables expressions like 'foo().member.submember'.
...
llvm-svn: 45395
2007-12-29 05:02:41 +00:00
Christopher Lamb
fd9af54ad1
Make MemberExpr code safe w.r.t. address spaces.
...
llvm-svn: 45394
2007-12-29 04:06:57 +00:00
Chris Lattner
7cafd92aa9
expand note.
...
llvm-svn: 45393
2007-12-29 01:05:01 +00:00
Chris Lattner
e96658392d
dead calls to llvm.stacksave can be deleted, even though they
...
have potential side-effects.
llvm-svn: 45392
2007-12-29 00:59:12 +00:00
Chris Lattner
bc03f70a07
upgrade this test
...
llvm-svn: 45391
2007-12-29 00:57:06 +00:00
Christopher Lamb
ad66035921
Fix an error in the base/idx accessors for ArraySubscriptExpr's that crops up with vector element access.
...
llvm-svn: 45390
2007-12-28 23:43:03 +00:00
Devang Patel
b57ff068cd
Test -simplifycfg only.
...
llvm-svn: 45389
2007-12-28 22:59:48 +00:00
Chris Lattner
9d53b611d1
add a note.
...
llvm-svn: 45388
2007-12-28 22:30:05 +00:00
Chris Lattner
d798002401
add a note.
...
llvm-svn: 45387
2007-12-28 21:50:40 +00:00
Owen Anderson
3de3f9981e
Add a testcase for my recent InstCombine fix, written by Nicholas.
...
llvm-svn: 45386
2007-12-28 21:08:43 +00:00
Owen Anderson
7363914ef7
Repair a transform that Chris noticed a bug in. Thanks to Nicholas for pointing out my stupid mistakes when writing this patch. :-)
...
llvm-svn: 45384
2007-12-28 07:42:12 +00:00
Chris Lattner
5179819beb
disable this instcombine xform, it miscompiles:
...
define i32 @main() {
entry:
%z = alloca i32 ; <i32*> [#uses=2]
store i32 0, i32* %z
%tmp = load i32* %z ; <i32> [#uses=1]
%sub = sub i32 %tmp, 1 ; <i32> [#uses=1]
%cmp = icmp ult i32 %sub, 0 ; <i1> [#uses=1]
%retval = select i1 %cmp, i32 1, i32 0 ; <i32> [#uses=1]
ret i32 %retval
}
into ret 1, instead of ret 0.
Christopher, please investigate.
llvm-svn: 45383
2007-12-28 06:24:31 +00:00
Chris Lattner
7ef31d3c53
various cleanups. Use IgnoreParenCasts instead of inlined versions.
...
llvm-svn: 45382
2007-12-28 05:38:24 +00:00
Chris Lattner
934edb210a
unindent cases in a switch stmt, no functionality change.
...
llvm-svn: 45381
2007-12-28 05:31:15 +00:00
Chris Lattner
0846494750
Change Sema::ActOnCallExpr to construct the CallExpr early and put it into
...
and OwningPtr instead of constructing only after all of sema is done. This
has a couple of effects:
1. it fixes memory leaks from all the error cases in sema
2. it simplifies the code significantly.
The cost of this is that the error case now new's and delete's an expr where
it did not before, but we don't care about the perf of the error case.
llvm-svn: 45380
2007-12-28 05:29:59 +00:00
Chris Lattner
6420345a34
move file to proper place in project.
...
llvm-svn: 45379
2007-12-28 05:27:01 +00:00
Chris Lattner
e4407ede20
Add accessors + iterator interface.
...
llvm-svn: 45378
2007-12-28 05:25:02 +00:00
Chris Lattner
180f0e9044
add a note
...
llvm-svn: 45377
2007-12-28 04:42:05 +00:00
Chris Lattner
02ac5e87e0
From Lucas Newman:
...
"Here's a tiny patch that lets the clang Xcode project build in any
location, so llvm doesn't have to be checked out in your home folder."
llvm-svn: 45376
2007-12-28 00:38:23 +00:00
Anton Korobeynikov
4f00f531ad
Ignore functions with internal linkages during linking. This snipped mimics the
...
behaviour of LinkGlobals() function.
llvm-svn: 45375
2007-12-27 23:21:57 +00:00
Chris Lattner
20bc6e06cd
add a file I forgot to svn add.
...
llvm-svn: 45374
2007-12-27 21:46:27 +00:00
Chris Lattner
cc10d93dcf
alphabetize in project.
...
llvm-svn: 45373
2007-12-27 20:59:50 +00:00
Chris Lattner
807979824e
use -emit-llvm-bc
...
llvm-svn: 45372
2007-12-27 20:35:58 +00:00
Chris Lattner
40ad6cd854
no need to verify this, no errors/warnings are expected.
...
llvm-svn: 45371
2007-12-27 20:31:56 +00:00
Chris Lattner
11221033be
Fix a crash on a top-level objc string, patch by Nico Weber
...
llvm-svn: 45370
2007-12-27 20:29:42 +00:00
Gordon Henriksen
05568bbd98
Adding bindings for target triple and data layout.
...
llvm-svn: 45369
2007-12-27 20:13:47 +00:00
Chris Lattner
5e530bcee3
- Use Tok.isObjCAtKeyword instead of Tok.getIdentifierInfo()->getObjCKeywordID().
...
The later fails if the token is not an identifier.
- Replace tabs with spaces.
- Various other cleanups.
Patch by Nico Weber!
llvm-svn: 45368
2007-12-27 19:57:00 +00:00
Gordon Henriksen
823f9730d7
Switch the bindings to use LLVMFoldingBuilder.
...
llvm-svn: 45367
2007-12-27 18:25:59 +00:00
Gordon Henriksen
d4749de856
Adding an uninitialized builder constructor to the Ocaml bindings.
...
llvm-svn: 45362
2007-12-26 21:21:51 +00:00
Anders Carlsson
c9d41e7d27
No need to do work that the folding builder does for us.
...
llvm-svn: 45361
2007-12-26 18:20:19 +00:00
Chris Lattner
bc13df19a8
one fewer uncond branch with my codegenprepare hack for single-mbb backedges.
...
llvm-svn: 45360
2007-12-26 17:23:47 +00:00
Seo Sanghyeon
acb00f4a73
Remove broken assert from CodeGen. Better check is done in Sema.
...
llvm-svn: 45358
2007-12-26 05:21:37 +00:00
Gordon Henriksen
d89e645c38
Tests for changes made in r45356, where IPO optimizations would drop
...
collector algorithms.
llvm-svn: 45357
2007-12-26 02:47:37 +00:00
Gordon Henriksen
520e64c0c2
Fixing several transforms which would drop the collector attribute
...
when copying functions.
llvm-svn: 45356
2007-12-25 22:16:06 +00:00
Chris Lattner
bea11173f5
update to llvm 2.0 syntax.
...
llvm-svn: 45355
2007-12-25 20:34:52 +00:00
Chris Lattner
ef1bbfc762
Don't break critical edges for single-bb loops, this helps with PR1877, though
...
it is only a partial fix. This change is noise for most programs, but
speeds up Shootout-C++/matrix by 20%, Ptrdist/ks by 24%, smg2000 by 8%,
hexxagon by 9%, bzip2 by 9% (not sure I trust this), ackerman by 13%, etc.
OTOH, it slows down Shootout/fib2 by 40% (I'll update PR1877 with this info).
llvm-svn: 45354
2007-12-25 19:06:45 +00:00
Seo Sanghyeon
d42a60baa0
Actually parse q operation in llvm-ar
...
llvm-svn: 45353
2007-12-25 13:53:47 +00:00
Gordon Henriksen
f23d2a59c5
Disabling -g for ocaml builds; it's not downwards compatible.
...
llvm-svn: 45352
2007-12-25 08:37:43 +00:00
Gordon Henriksen
b969c5981b
GC poses hazards to the inliner. Consider:
...
define void @f() {
...
call i32 @g()
...
}
define void @g() {
...
}
The hazards are:
- @f and @g have GC, but they differ GC. Inlining is invalid. This
may never occur.
- @f has no GC, but @g does. g's GC must be propagated to @f.
The other scenarios are safe:
- @f and @g have the same GC.
- @f and @g have no GC.
- @g has no GC.
This patch adds inliner checks for the former two scenarios.
llvm-svn: 45351
2007-12-25 03:10:07 +00:00
Gordon Henriksen
fb56bde933
Noting and enforcing that GC intrinsics are valid only within a
...
function with GC.
This will catch the error when the inliner inlines a function with
GC into a caller with no GC.
llvm-svn: 45350
2007-12-25 02:31:26 +00:00
Gordon Henriksen
9157c499fc
Adjusting verification of "llvm.gc*" intrinsic prototypes to match
...
LangRef.
llvm-svn: 45349
2007-12-25 02:02:10 +00:00
Christopher Lamb
2b84813441
Make output files binary mode for -emit-llvm-bc
...
llvm-svn: 45348
2007-12-24 23:49:33 +00:00
Owen Anderson
bccb8c432d
Flesh out the Briggs implementation a little bit more, fix a few FIXMEs.
...
llvm-svn: 45347
2007-12-24 22:12:23 +00:00
Christopher Lamb
d01dea749e
Almost the best possible handling of stdin/stdout for llvm-emit-bc!
...
llvm-svn: 45346
2007-12-24 20:59:36 +00:00
Christopher Lamb
1c0f5d2436
Better handing of stdin/stdout for -emit-llvm-bc
...
llvm-svn: 45345
2007-12-24 20:56:07 +00:00
Chris Lattner
62a806d565
add a -backedge-hack llc-beta option to codegenprepare.
...
When specified, don't split backedges of single-bb loops.
This helps address PR1877
llvm-svn: 45344
2007-12-24 19:32:55 +00:00
Chris Lattner
6c234bf58f
add a simple hack
...
llvm-svn: 45343
2007-12-24 19:27:46 +00:00
Anton Korobeynikov
ee6af40c95
Cygwin defines uint32_t as unsigned long. Unbreak call to std::min in this case
...
llvm-svn: 45342
2007-12-24 11:16:47 +00:00
Ted Kremenek
563b21b013
Added special support for stripping CRLF characters that may appear in the
...
output of nm.
llvm-svn: 45341
2007-12-24 08:04:39 +00:00
Christopher Lamb
5a3416409f
Allow bitcode output to be redirected to stdout.
...
llvm-svn: 45340
2007-12-24 03:23:55 +00:00
Seo Sanghyeon
76270e6be6
Implement -emit-llvm-bc option
...
llvm-svn: 45339
2007-12-24 01:52:34 +00:00
Gordon Henriksen
84c7325ca1
Setting GlobalDirective in TargetAsmInfo by default rather than
...
providing a misleading facility. It's used once in the MIPS backend
and hardcoded as "\t.globl\t" everywhere else.
llvm-svn: 45338
2007-12-23 20:58:16 +00:00
Owen Anderson
6d070f39b8
Get rid of an unneeded #include.
...
llvm-svn: 45337
2007-12-23 20:34:06 +00:00
Gordon Henriksen
83097d8818
Fix some Ocaml GC errors noticed upon review.
...
llvm-svn: 45336
2007-12-23 17:10:23 +00:00
Gordon Henriksen
2a8cd89d03
C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).
...
llvm-svn: 45335
2007-12-23 16:59:28 +00:00
Owen Anderson
e110199916
Sketch out an implementation of Briggs' copy placement algorithm.
...
llvm-svn: 45334
2007-12-23 15:37:26 +00:00
Owen Anderson
ef41b910e5
Add GraphTraits specializations for machine dominators.
...
llvm-svn: 45333
2007-12-23 15:16:46 +00:00
Seo Sanghyeon
6f1b274976
String literal in aggregate expression
...
llvm-svn: 45330
2007-12-23 03:11:58 +00:00
Chris Lattner
b907c3fca1
remove use of alloca.
...
llvm-svn: 45329
2007-12-23 01:40:15 +00:00
Anton Korobeynikov
03f8a3630d
Unbreak mingw build
...
llvm-svn: 45328
2007-12-23 01:19:32 +00:00
Gordon Henriksen
e09a4f8515
Undo a wrong bit in that last patch.
...
llvm-svn: 45327
2007-12-22 23:34:26 +00:00
Gordon Henriksen
8790a22a30
Document a more robust implementation of performCustomLowering.
...
llvm-svn: 45326
2007-12-22 23:32:32 +00:00
Chris Lattner
00602f6105
fix some warnings. This code needs to be de-tabified :(
...
llvm-svn: 45325
2007-12-22 22:47:03 +00:00
Chris Lattner
91f3379660
fix strict-aliasing violation
...
llvm-svn: 45324
2007-12-22 22:45:38 +00:00
Chris Lattner
de272b1b63
initial code for forming an FGETSIGN node. This is disabled until
...
legalizer support goes in.
llvm-svn: 45323
2007-12-22 21:35:38 +00:00
Chris Lattner
afc8f13bf5
improve support for fgetsign
...
llvm-svn: 45322
2007-12-22 21:26:52 +00:00
Chris Lattner
efd1cddb5a
Tell TargetLoweringOpt whether it is running before
...
or after legalize.
llvm-svn: 45321
2007-12-22 20:56:36 +00:00
Chris Lattner
843cad4df2
Add a new FGETSIGN operation, which defaults to expand on all
...
targets.
llvm-svn: 45320
2007-12-22 20:47:56 +00:00
Anton Korobeynikov
1b1250770c
Erm, really disable :)
...
llvm-svn: 45319
2007-12-22 20:46:24 +00:00
Anton Korobeynikov
d34112a4ee
Disable, until we'll really need it
...
llvm-svn: 45318
2007-12-22 20:41:12 +00:00
Gordon Henriksen
0c43064daf
Fix a partial application typo.
...
llvm-svn: 45317
2007-12-22 19:41:30 +00:00
Gordon Henriksen
41689b52ab
Use getIntrinsicID instead of looking up intrinsic prototypes. Also
...
fixes a bug with indirect calls. (Test case will be included with
ocaml collector patch.)
llvm-svn: 45316
2007-12-22 17:27:01 +00:00
Anton Korobeynikov
eed7c0b9f7
Unbreak build on gcc 3.x
...
llvm-svn: 45315
2007-12-22 14:27:49 +00:00
Anton Korobeynikov
2ffb2c9e59
Unbreak mingw build
...
llvm-svn: 45314
2007-12-22 14:26:49 +00:00
Evan Cheng
345a00ba05
Preliminary PIC JIT support for X86 (32-bit) / Darwin.
...
llvm-svn: 45313
2007-12-22 09:40:20 +00:00
Evan Cheng
db33a0211b
Oops.
...
llvm-svn: 45312
2007-12-22 09:14:34 +00:00
Chris Lattner
74b2ab59fd
implement InstCombine/shift-trunc-shift.ll. This allows
...
us to compile:
#include <math.h>
int t1(double d) { return signbit(d); }
into:
_t1:
movd %xmm0, %rax
shrq $63, %rax
ret
instead of:
_t1:
movd %xmm0, %rax
shrq $32, %rax
shrl $31, %eax
ret
on x86-64.
llvm-svn: 45311
2007-12-22 09:07:47 +00:00
Owen Anderson
5a4c05d047
Note what still needs doing.
...
llvm-svn: 45310
2007-12-22 04:59:10 +00:00
Owen Anderson
4534100765
Remove critical edge breaking. It won't be necessary as long as we are very careful when inserting copies.
...
llvm-svn: 45309
2007-12-22 04:50:11 +00:00
Gordon Henriksen
1621129e6b
Ignoring generated files.
...
llvm-svn: 45308
2007-12-22 04:44:11 +00:00
Evan Cheng
f4f52dbc8c
Fix JIT code emission of X86::MovePCtoStack.
...
llvm-svn: 45307
2007-12-22 02:26:46 +00:00
Ted Kremenek
dbc5385608
Added (incomplete) implementation of SimulEngine, a worklist-based dataflow
...
solver for path-sensitive, intra-procedural analysis.
llvm-svn: 45306
2007-12-22 01:43:37 +00:00
Devang Patel
7a2c66b11e
If succ has succ itself as one of the predecessors then do
...
not merge current bb and succ even if bb's terminator is
unconditional branch to succ.
llvm-svn: 45305
2007-12-22 01:32:53 +00:00
Evan Cheng
ac134551c6
Allow JIT with non-static relocation model.
...
llvm-svn: 45304
2007-12-22 01:12:14 +00:00
Fariborz Jahanian
4f41b272c9
Another test case, testing a variety of objective-c type comparisons.
...
llvm-svn: 45302
2007-12-22 00:17:49 +00:00
Fariborz Jahanian
24e1a0bd35
Another test for objective-c's type comparison.
...
llvm-svn: 45301
2007-12-21 23:48:59 +00:00
Anton Korobeynikov
1e8c1308bb
Fix silly typo in the FP CEP handling.
...
llvm-svn: 45300
2007-12-21 23:33:44 +00:00
Ted Kremenek
e7e26cd01e
Converted Loc back to being of type ProgramEdge. Ultimately I believe we want
...
the ability to refer to the vertex set for all the vertices associated with an
edge. This will allow some nice queries over the graph, and (hopefully) will
reduce the memory footprint of SimulVertex.
llvm-svn: 45299
2007-12-21 23:23:12 +00:00
Ted Kremenek
e1d1a9479f
Added preliminary implementation of SimulGraph, which represents the
...
intra-procedural supergraph of a path-sensitive dataflow analysis.
llvm-svn: 45298
2007-12-21 23:21:58 +00:00
Ted Kremenek
908cff9fa4
Changed "Location" from "ProgramEdge" to "ProgramEdge&" (slightly more svelt
...
memory representation).
llvm-svn: 45297
2007-12-21 22:57:10 +00:00
Ted Kremenek
95416706ed
SimulVertex now subclasses FoldingSetNode.
...
llvm-svn: 45296
2007-12-21 22:41:58 +00:00
Ted Kremenek
1616945a7d
Added Profile method to SimulVertex.
...
llvm-svn: 45295
2007-12-21 22:40:41 +00:00
Fariborz Jahanian
a7c705ddca
This patch implements some of the more obscure type-checking involving
...
'id' quallified with protocols and static types which have categories and
inheritance which implement these protocols.
llvm-svn: 45294
2007-12-21 22:22:33 +00:00
Ted Kremenek
fda0aaf01b
Updated Xcode project to be in sync with recent changes in file locations
...
introduced in r45292 (http://llvm.org/viewvc/llvm-project?rev=45292&view=rev )
llvm-svn: 45293
2007-12-21 21:48:31 +00:00
Ted Kremenek
bf593f81fa
Directory restructing of Analysis files.
...
Created include/clang/Analysis/Analyses directory.
- Moved LiveVariables.h and UninitializedValues.h into this dir.
Moved ExprDeclBitVector.h into Analysis/Support.
Updated all clients who use these headers to reflect the new paths.
llvm-svn: 45292
2007-12-21 21:42:19 +00:00
Ted Kremenek
f55ed782b4
Renamed file AnalysisVertex.h to SimulVertex.h
...
llvm-svn: 45291
2007-12-21 21:17:22 +00:00
Ted Kremenek
3d8b0d6948
Renamed class AnalysisVertex to SimulVertex
...
llvm-svn: 45290
2007-12-21 21:16:58 +00:00
Duncan Sands
85f26f28b9
Fix a brain fart by our beloved leader (the content
...
of this patch is the last line).
llvm-svn: 45289
2007-12-21 20:18:41 +00:00
Ted Kremenek
93e2031187
Fixed successor order for CFG basic blocks when handling: x && y. The bug
...
is best explained by illustration:
[ B2 ]
1: x
T: [B2.1] && ...
Predecessors (1): B4
Successors (2): B3 B1
Block "B3" should be the block where we evaluate "y" when "x" evaluates to
true. Previously we had the successor list reversed. Now this behavior matches
with how we handle other conditional branches.
Thanks to Nuno Lopes for reporting this problem.
llvm-svn: 45288
2007-12-21 19:49:00 +00:00
Devang Patel
505b4f1fd4
Convert opaque type when struct definition is seen.
...
llvm-svn: 45287
2007-12-21 19:35:28 +00:00
Duncan Sands
8c5822802e
Get the verifier to check attributes on calls as well
...
as on functions. Make it verify invokes and not just
ordinary calls. As a (desired) side-effect, it is no
longer legal to have call attributes on arguments that
are being passed to the varargs part of a varargs
function (llvm-as drops them on the floor anyway).
llvm-svn: 45286
2007-12-21 19:19:01 +00:00
Duncan Sands
6a7703ed63
Make DAE not wipe out attributes on calls, and not drop
...
return attributes on the floor. In the case of a call
to a varargs function where the varargs arguments are
being removed, any call attributes on those arguments
need to be dropped. I didn't do this because I plan to
make it illegal to have such attributes (see next patch).
With this change, compiling the gcc filter2 eh test at -O0
and then running opt -std-compile-opts on it results in
a correctly working program (compiling at -O1 or higher
results in the test failing due to a problem with how we
output eh info into the IR).
llvm-svn: 45285
2007-12-21 19:16:16 +00:00
Devang Patel
016e41e8a6
Keep track of llvm struct size while adding fields.
...
Update addPaddingFields() interface.
llvm-svn: 45284
2007-12-21 18:43:53 +00:00
Fariborz Jahanian
56b5c96ef7
Patch to compare to objective-c static types where one or the other
...
(but not both) may be a protocol qualified static type.
llvm-svn: 45283
2007-12-21 17:34:43 +00:00
Nicolas Geoffray
31a2c3948e
Fix unintented change from last commit
...
llvm-svn: 45282
2007-12-21 12:22:29 +00:00
Nicolas Geoffray
80c741e160
Enable EH for linux/ppc32 targets
...
llvm-svn: 45281
2007-12-21 12:19:44 +00:00
Evan Cheng
78c460c8c4
New entry.
...
llvm-svn: 45280
2007-12-21 01:31:58 +00:00
Evan Cheng
b54038fc29
Add a few more missing gcc builtin's.
...
llvm-svn: 45278
2007-12-21 01:30:39 +00:00
Fariborz Jahanian
fd6f3a2460
Test case for my last patch.
...
llvm-svn: 45277
2007-12-21 00:35:35 +00:00
Fariborz Jahanian
ff7d2bf255
More objective-c type analysis. This time involving objective types
...
of conforming protocols (or not).
llvm-svn: 45276
2007-12-21 00:33:59 +00:00
Ted Kremenek
1cf6c7aa5b
Removed scoped_ptr, as its functionality is subsumed by OwningPtr.
...
llvm-svn: 45274
2007-12-21 00:15:29 +00:00
Ted Kremenek
b149889df6
Added class "StateVariant", a template class which serves to wrap states that
...
are generated by transfer functions used by the path-sensitive dataflow solver.
llvm-svn: 45273
2007-12-21 00:04:19 +00:00
Ted Kremenek
f40d2740b6
Added initial implementation of "AnalysisVertex", a class to represent a
...
location*state vertex in an intra-procedural, path-sensitive dataflow
supergraph.
llvm-svn: 45272
2007-12-20 23:24:55 +00:00
Fariborz Jahanian
76fcf32632
Another test for objective-c type comparison.
...
llvm-svn: 45271
2007-12-20 22:53:29 +00:00
Fariborz Jahanian
4368af07a7
More objective-c type checking. This time comparing objective-c known objects.
...
llvm-svn: 45269
2007-12-20 22:37:58 +00:00
Evan Cheng
01c7c198ee
Fix JIT encoding for CMPSD as well.
...
llvm-svn: 45268
2007-12-20 19:57:09 +00:00
Ted Kremenek
5e2413384e
Added OwningArrayPtr smart pointer class to provide an analogous class to
...
OwningPtr except that it works for pointers to arrays.
llvm-svn: 45266
2007-12-20 19:53:47 +00:00
Ted Kremenek
71d643f8b1
Converted uses of scoped_ptr to OwningPtr.
...
llvm-svn: 45265
2007-12-20 19:47:16 +00:00
Fariborz Jahanian
63b19f1b6e
Patch to do type-checking for objctive-c's object types.
...
More is yet to come.
llvm-svn: 45263
2007-12-20 19:24:10 +00:00
Chris Lattner
1991794112
add accessor.
...
llvm-svn: 45262
2007-12-20 19:14:21 +00:00
Chris Lattner
63fbcdf6ca
add new smart pointer for clang.
...
llvm-svn: 45261
2007-12-20 19:14:02 +00:00
Evan Cheng
c226ed0273
Type specification didn't match gcc's.
...
llvm-svn: 45260
2007-12-20 09:35:28 +00:00
Evan Cheng
f989141d30
More accurate checks for two-address constraints.
...
llvm-svn: 45259
2007-12-20 09:25:31 +00:00
Seo Sanghyeon
58bdfda87c
Add newline
...
llvm-svn: 45257
2007-12-20 07:22:20 +00:00
Christopher Lamb
7d82bc46b8
Implement review feedback, including additional transforms
...
(icmp slt (sub A B) 1) -> (icmp sle A B)
icmp sgt (sub A B) -1) -> (icmp sge A B)
and add testcase.
llvm-svn: 45256
2007-12-20 07:21:11 +00:00
Chris Lattner
e2cf5b8c5c
Add m_Zero().
...
llvm-svn: 45255
2007-12-20 04:47:44 +00:00
Evan Cheng
ddc9af11f0
Remove xfail. This is fixed.
...
llvm-svn: 45254
2007-12-20 02:25:21 +00:00
Evan Cheng
a509537e25
The physical register + virtual register joining requirement was much too strict.
...
llvm-svn: 45253
2007-12-20 02:23:25 +00:00
Evan Cheng
61bc51ee97
Bring back a burr scheduling heuristic that's still needed.
...
llvm-svn: 45252
2007-12-20 02:22:36 +00:00
Evan Cheng
26ee54eb05
Clean up previous patch: PHI uses should not prevent iv reuse if all other uses are addresses. This trades a constant multiply for one fewer iv.
...
llvm-svn: 45251
2007-12-20 02:20:53 +00:00
Chris Lattner
16a51da0e2
simplify this code with the new m_Zero() pattern. Make sure the select only
...
has a single use, and generalize it to not require N to be a constant.
llvm-svn: 45250
2007-12-20 01:56:58 +00:00
Devang Patel
c006744c38
Revert my previous check-in.
...
llvm-svn: 45249
2007-12-20 01:46:01 +00:00
Chris Lattner
8304df9024
Fix trivial self-infinite-recursion
...
llvm-svn: 45248
2007-12-20 01:38:17 +00:00
Anton Korobeynikov
dce44d87f8
More eye-candy stuff :)
...
llvm-svn: 45247
2007-12-20 01:30:27 +00:00
Anton Korobeynikov
5ab614824d
Add iterators for child traversal.
...
llvm-svn: 45246
2007-12-20 01:21:50 +00:00
Bill Wendling
65c001e6bc
Updated comments to reflect what "side effects" means in this situation.
...
llvm-svn: 45245
2007-12-20 01:08:10 +00:00
Fariborz Jahanian
134cbefba2
More objective-c typechecking stuff. This is work in progress and more patches
...
are due to arrive.
llvm-svn: 45244
2007-12-20 01:06:58 +00:00
Chris Lattner
6c9ffe9529
Implement codegen for ordered comparison builtins.
...
llvm-svn: 45243
2007-12-20 00:44:32 +00:00
Scott Michel
5f1470f03a
More working CellSPU tests:
...
- vec_const.ll: Vector constant loads
- immed64.ll: i64, f64 constant loads
llvm-svn: 45242
2007-12-20 00:44:13 +00:00
Ted Kremenek
371efafb94
Created initial implementation of "BuildSerializer", and ASTConsumer
...
which serializes ASTs to a common output directory. This ASTConsumer
is invoked using a combination of "-o" and "-serialize" from the driver.
llvm-svn: 45241
2007-12-20 00:34:58 +00:00
Ted Kremenek
62c462f9c5
Renamed "FileEntry::getDev()" to "FileEntry::getDevice()"
...
llvm-svn: 45240
2007-12-20 00:29:44 +00:00
Chris Lattner
2da14fb84f
implement semantic analysis for __builtin_islessequal and friends.
...
llvm-svn: 45239
2007-12-20 00:26:33 +00:00
Devang Patel
6d279d484a
Add lto version check mechanism.
...
llvm-svn: 45238
2007-12-20 00:24:01 +00:00
Ted Kremenek
8babe3d9c4
Added method getFileEntryForID() to SourceManager.
...
llvm-svn: 45237
2007-12-20 00:15:17 +00:00
Gordon Henriksen
59db63d5fc
Use a module to group calling convention values, too.
...
llvm-svn: 45236
2007-12-20 00:13:26 +00:00
Chris Lattner
e202e6af48
simplify some code.
...
llvm-svn: 45235
2007-12-20 00:05:45 +00:00
Chris Lattner
43be2e6004
refactor some code that handles sema of direct function calls.
...
llvm-svn: 45234
2007-12-19 23:59:04 +00:00
Chris Lattner
9b65d3506e
Add iterator interface to function/method parameters.
...
llvm-svn: 45233
2007-12-19 23:58:25 +00:00
Ted Kremenek
ca07147851
Split serialization ASTConsumers into two consumers: SingleFileSerializer and
...
BuildSerializer. The former serializes a single translation unit to a
corresponding .ast file. The second serializes ASTs to a common emission
direction. The latter is not fully implemented yet.
llvm-svn: 45232
2007-12-19 23:49:37 +00:00
Ted Kremenek
96e05d4f31
Added methods createMainFileID() and createMainFileIDForMemBuffer() to
...
SourceManager to allow SourceManager to directly intern the MainFileID
when it is created. Removed setMainFileID().
llvm-svn: 45231
2007-12-19 23:48:45 +00:00
Evan Cheng
e2a8ba7fec
Allow iv reuse if the user is a PHI node which is in turn used as addresses.
...
llvm-svn: 45230
2007-12-19 23:33:23 +00:00
Gordon Henriksen
eb4ce98f98
Using modules to group enumerations in Ocaml bindings.
...
llvm-svn: 45229
2007-12-19 22:54:12 +00:00
Ted Kremenek
230bd918b2
Interned MainFileID within SourceManager. Since SourceManager is referenced by
...
both Preprocessor and ASTContext, we no longer need to explicitly pass
MainFileID around in function calls that also pass either Preprocessor or
ASTContext. This resulted in some nice cleanups in the ASTConsumers and the
driver.
llvm-svn: 45228
2007-12-19 22:51:13 +00:00
Ted Kremenek
f7bfae6b45
Typo fix.
...
llvm-svn: 45227
2007-12-19 22:32:34 +00:00
Gordon Henriksen
34eb6d877e
Adding bindings for memory buffers and module providers. Switching
...
to exceptions rather than variants for error handling in Ocaml.
llvm-svn: 45226
2007-12-19 22:30:40 +00:00
Ted Kremenek
9a53275918
Added storage of the FileID of the the main source file of a translation unit
...
in SourceManager.
llvm-svn: 45225
2007-12-19 22:29:55 +00:00
Steve Naroff
fa5751f842
Various tweaks to the get/lookup instance/class method API's.
...
llvm-svn: 45224
2007-12-19 22:27:04 +00:00
Ted Kremenek
6c7807716b
Removed "SourceFile" from TranslationUnit. This same information will (soon)
...
be available by querying the SourceManager within the ASTContext referenced by
the TranslationUnit.
llvm-svn: 45223
2007-12-19 22:24:34 +00:00
Chris Lattner
7bd082e188
Describe Nico's script for gcc interception. Patch by Nico Weber.
...
llvm-svn: 45222
2007-12-19 22:17:19 +00:00
Dale Johannesen
eadbf4b91c
Enable EH on PPC Darwin. This basically works; there
...
are a couple of issues that show up with the optimizer,
but I don't think they're really EH problems.
(llvm-gcc testsuite users note: By default the testsuite
uses the unwinding code that's built as part of your local
llvm-gcc, which does not work. You need to trick it into
using the installed system unwinding code to get useful
results.)
llvm-svn: 45221
2007-12-19 21:54:36 +00:00
Scott Michel
5ecac82f71
CellSPU testcase, extract_elt.ll: extract vector element.
...
llvm-svn: 45219
2007-12-19 21:17:42 +00:00
Duncan Sands
aa31b92508
When inlining through an 'nounwind' call, mark inlined
...
calls 'nounwind'. It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.
llvm-svn: 45218
2007-12-19 21:13:37 +00:00
Scott Michel
a246e09aa0
More working CellSPU test cases:
...
- call.ll: Function call
- ctpop.ll: Count population
- dp_farith.ll: DP arithmetic
- eqv.ll: Equivalence primitives
- fcmp.ll: SP comparisons
- fdiv.ll: SP division
- fneg-fabs.ll: SP negation, aboslute value
- int2fp.ll: Integer -> SP conversion
- rotate_ops.ll: Rotation primitives
- select_bits.ll: (a & c) | (b & ~c) bit selection
- shift_ops.ll: Shift primitives
- sp_farith.ll: SP arithmentic
llvm-svn: 45217
2007-12-19 20:50:49 +00:00
Scott Michel
098c113bc8
Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
...
(vector insertions)
llvm-svn: 45216
2007-12-19 20:15:47 +00:00
Ted Kremenek
aff2343af3
Cleaned up "-o" option to print "-o=<path>" instead of "-o=<string>" when
...
doing clang --help.
llvm-svn: 45215
2007-12-19 19:50:41 +00:00
Chris Lattner
f1be288617
fix formatting
...
llvm-svn: 45214
2007-12-19 19:48:49 +00:00
Ted Kremenek
6c0b224011
Added "-o" option to driver. ASTConsumers will need to be gradually
...
rewired to utilize this option.
Renamed option --serialize-ast --serialize.
llvm-svn: 45213
2007-12-19 19:47:59 +00:00
Chris Lattner
c238331377
Add support for #pragma mark, which shouldn't warn about bogus tokens.
...
llvm-svn: 45212
2007-12-19 19:38:36 +00:00
Ted Kremenek
0061aeb316
Removed storing inode and device number in TranslationUnit.
...
Added "SourceFile" string to TranslationUnit to record corresponding
source file.
Updated serialization of TranslationUnits and logic in the driver to
correctly pass the source file information to the serializer.
llvm-svn: 45211
2007-12-19 19:27:38 +00:00
Chris Lattner
6a4f74593c
fix some crazy indentation
...
llvm-svn: 45210
2007-12-19 19:23:28 +00:00
Steve Naroff
7e718bb3fd
Soften the macro rewrite error to a warning (and change the text).
...
llvm-svn: 45209
2007-12-19 19:16:49 +00:00
Fariborz Jahanian
6a128ae962
Minor test twik.
...
llvm-svn: 45208
2007-12-19 19:07:24 +00:00
Ted Kremenek
0ec9a20bf0
Updated locations of TranslationUnit.[cpp,h] in XCode project.
...
Added AST/ASTConsumer.cpp to XCode project.
llvm-svn: 45206
2007-12-19 18:07:54 +00:00
Chris Lattner
2a70c95387
reenable this code, fix the testcase.
...
llvm-svn: 45205
2007-12-19 18:01:43 +00:00
Chris Lattner
99488aec20
disable my commit from yesterday, fixing a regression test failure.
...
llvm-svn: 45204
2007-12-19 17:49:45 +00:00
Fariborz Jahanian
a1e3420c49
This patch concludes implementation of dynamic objective-c type qualified by
...
protocol list.
llvm-svn: 45203
2007-12-19 17:45:58 +00:00
Anders Carlsson
2c26cc232f
Fix the embarassing typo for real this time (- vs _), sorry about breaking the tests Steve.
...
llvm-svn: 45202
2007-12-19 17:43:24 +00:00
Ted Kremenek
6c3777c319
Moved generation of the name of the serialized AST file into
...
CreateASTSerializer.
llvm-svn: 45201
2007-12-19 17:25:59 +00:00
Steve Naroff
55cb4be8ae
Emit errors when attempting to rewrite ObjC expressions that originate from a macro expansion.
...
We plan on fixing this and removing this restriction after the break...
llvm-svn: 45200
2007-12-19 14:32:56 +00:00
Steve Naroff
735a2716de
Revert Anders r45191 commit...it broke several of the tests.
...
llvm-svn: 45199
2007-12-19 14:11:27 +00:00
Duncan Sands
e9d8861cdf
Simplify LowerCallTo by using a callsite.
...
llvm-svn: 45198
2007-12-19 09:48:52 +00:00
Duncan Sands
030bce7b83
The C++ exception handling personality function wants
...
to know about calls that cannot throw ('nounwind'):
if such a call does throw for some reason then the
personality will terminate the program. The distinction
between an ordinary call and a nounwind call is that
an ordinary call gets an entry in the exception table
but a nounwind call does not. This patch sets up the
exception table appropriately. One oddity is that
I've chosen to bracket nounwind calls with labels (like
invokes) - the other choice would have been to bracket
ordinary calls with labels. While bracketing
ordinary calls is more natural (because bracketing
by labels would then correspond exactly to getting an
entry in the exception table), I didn't do it because
introducing labels impedes some optimizations and I'm
guessing that ordinary calls occur more often than
nounwind calls. This fixes the gcc filter2 eh test,
at least at -O0 (the inliner needs some tweaking at
higher optimization levels).
llvm-svn: 45197
2007-12-19 07:36:31 +00:00
Scott Michel
9b834469e0
Add new immed16.ll test case, fix CellSPU errata to make test case work.
...
llvm-svn: 45196
2007-12-19 07:35:06 +00:00
Anders Carlsson
721f601507
Fix an embarassing typo and add some very limited support for the aligned attribute.
...
llvm-svn: 45195
2007-12-19 07:19:40 +00:00
Christopher Lamb
e592175f80
svn:ignore configure.out at the root level
...
llvm-svn: 45194
2007-12-19 06:43:23 +00:00
Christopher Lamb
6af61fab70
Change svn attributes to ignore build directories.
...
llvm-svn: 45193
2007-12-19 06:41:17 +00:00
Bill Wendling
b528a10e0a
Modified to support comments better.
...
llvm-svn: 45192
2007-12-19 06:20:05 +00:00
Anders Carlsson
081f1b411d
Normalize attribute names if possible so we won't have to do two strcmps for every attribute.
...
llvm-svn: 45191
2007-12-19 06:16:30 +00:00
Bill Wendling
ca77ecb40a
Mark the "isRemat" instruction as never having side effects.
...
llvm-svn: 45190
2007-12-19 06:07:48 +00:00
Chris Lattner
0f8a39c793
fix broken assert.
...
llvm-svn: 45189
2007-12-19 05:38:06 +00:00
Chris Lattner
ea72f449fe
Implement C99 6.7.5.3p1
...
llvm-svn: 45188
2007-12-19 05:31:29 +00:00
Chris Lattner
747359f973
fix more table abuses.
...
llvm-svn: 45187
2007-12-19 05:04:11 +00:00
Evan Cheng
9f06e5e2df
Don't leave newly created nodes around if it turns out they are not needed.
...
llvm-svn: 45186
2007-12-19 01:34:38 +00:00
Ted Kremenek
f4c38c9289
Refactored inode and device number into FileEntry, and changed the
...
ADT storing FileEntry's in FileManager from a map to a set.
llvm-svn: 45184
2007-12-18 22:29:39 +00:00
Ted Kremenek
8c8947fb92
When serializing SourceManager, we now serialize out absolute paths
...
to serialized source files.
llvm-svn: 45183
2007-12-18 22:12:19 +00:00
Ted Kremenek
14020706d8
Added "GetCurrentDirectory()" to sys::Path.
...
llvm-svn: 45182
2007-12-18 22:07:33 +00:00
Ted Kremenek
f70d24d2ae
Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made them
...
the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile
respectively.
llvm-svn: 45180
2007-12-18 21:44:50 +00:00
Steve Naroff
824a9d8d4b
Fix serious regression with ObjcInterfaceDecl. Now that we are storing -1 to mean undefined, we need to change the respective getters from unsigned->int.
...
llvm-svn: 45179
2007-12-18 21:41:31 +00:00
Bill Wendling
166f746246
Add debugging info. Use the newly created "hasUnmodelledSideEffects" method.
...
llvm-svn: 45178
2007-12-18 21:38:04 +00:00
Ted Kremenek
25dbd71a4c
Fixed broken includes introduced by recent (incomplete) patch to
...
TranslationUnit.
llvm-svn: 45177
2007-12-18 21:36:21 +00:00
Ted Kremenek
afb98f9c09
Moved TranslationUnit.h to include path.
...
llvm-svn: 45176
2007-12-18 21:34:50 +00:00
Ted Kremenek
879b75018f
Moved TranslationUnit from Driver to AST library.
...
llvm-svn: 45175
2007-12-18 21:34:28 +00:00
Fariborz Jahanian
9f0e310861
Refactoring work. ObjcQualifiedIdType is now derived from 'Type'.
...
llvm-svn: 45174
2007-12-18 21:33:44 +00:00
Christopher Lamb
f00ac6dd93
Fold subtracts into integer compares vs. zero. This improves generate code for this case on X86
...
from
_foo:
movl $99, %ecx
movl 4(%esp), %eax
subl %eax, %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovs %edx, %eax
ret
to
_foo:
xorl %ecx, %ecx
movl 4(%esp), %eax
cmpl $99, %eax
cmovg %ecx, %eax
ret
llvm-svn: 45173
2007-12-18 21:32:20 +00:00
Anton Korobeynikov
95cc3e0e66
Support more insane CEP's in AsmPrinter (Yes, PyPy folks do really use them).
...
llvm-svn: 45172
2007-12-18 20:53:41 +00:00
Ted Kremenek
a51c88ccd8
Added to FileEntry a pointer to the <dev_t,ino_t> pair for the file, and
...
accessors to FileEntry to query these values.
llvm-svn: 45171
2007-12-18 20:45:25 +00:00
Christopher Lamb
b7016c53d1
Fix comments
...
llvm-svn: 45170
2007-12-18 20:33:11 +00:00
Christopher Lamb
74dbad9216
Remove an orthogonal transformation of the selection condition from my most recent submission.
...
llvm-svn: 45169
2007-12-18 20:30:28 +00:00
Ted Kremenek
74db04261b
Added "isDirectory" method to llvm::sys::Path.
...
llvm-svn: 45168
2007-12-18 19:46:22 +00:00
Evan Cheng
483a969ece
Fix PR1872: SrcValue and SrcValueOffset should not be used to compute load / store node id.
...
llvm-svn: 45167
2007-12-18 19:38:14 +00:00
Bill Wendling
7c0bea1ce9
Ignore shell scripts when doing "dsymutil" call.
...
llvm-svn: 45166
2007-12-18 19:21:52 +00:00
Chris Lattner
5f47cae3ce
remove obviously dead uses of IncludeFile.
...
llvm-svn: 45165
2007-12-18 19:15:48 +00:00
Evan Cheng
78ced47a2f
Also print alignment and volatileness.
...
llvm-svn: 45164
2007-12-18 19:06:30 +00:00
Chris Lattner
d92e71cf9a
remove a dead annotation
...
llvm-svn: 45163
2007-12-18 19:04:24 +00:00
Ted Kremenek
3d71ad1976
Added some sectioning comments to Serialize.h.
...
Added additional serialization functors for use with std::foreach.
llvm-svn: 45162
2007-12-18 18:25:55 +00:00
Chris Lattner
2583a66295
add an obvious load folding missed optzn.
...
llvm-svn: 45161
2007-12-18 16:48:14 +00:00
Duncan Sands
3353ed09ac
Rename isNoReturn to doesNotReturn, and isNoUnwind to
...
doesNotThrow.
llvm-svn: 45160
2007-12-18 09:59:50 +00:00
Christopher Lamb
30291f4a30
Fix typos.
...
llvm-svn: 45159
2007-12-18 09:45:40 +00:00
Christopher Lamb
8b09a464b4
Fold certain additions through selects (and their compares) so as to eliminate subtractions. This code is often produced by the SMAX expansion in SCEV.
...
This implements test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll
llvm-svn: 45158
2007-12-18 09:34:41 +00:00
Evan Cheng
91e0fc9cb4
FIX for PR1799: When a load is unfolded from an instruction, check if it is a new node. If not, do not create a new SUnit.
...
llvm-svn: 45157
2007-12-18 08:42:10 +00:00
Chris Lattner
37bd2ecb11
local static vars are globals also. This fixes a testcase
...
reported by Seo.
llvm-svn: 45156
2007-12-18 08:16:44 +00:00
Chris Lattner
d4fc27e937
remove the loc argument to Type::isConstantSizeType, which isn't useful.
...
llvm-svn: 45155
2007-12-18 07:18:16 +00:00
Chris Lattner
20aad334c7
Fix the location we emit the "not a constant" error for this:
...
int foo() {
typedef int x[foo()];
static int y = sizeof(x);
}
previously we'd emit it on the typedef, which made not sense at all.
llvm-svn: 45154
2007-12-18 07:15:40 +00:00
Chris Lattner
6d2d1b67ca
Fix PR1863: an assertion due to not setting a location on return from
...
this method.
llvm-svn: 45153
2007-12-18 07:03:30 +00:00
Chris Lattner
78e34a00f4
Fix const propagation bug.
...
llvm-svn: 45152
2007-12-18 07:02:56 +00:00
Evan Cheng
e2dbba5828
SelectionDAG::dump() should print SrcValue of LoadSDNode and StoreSDNode.
...
llvm-svn: 45151
2007-12-18 07:02:08 +00:00
Chris Lattner
9a2e3cb48d
avoid confusing terminology (what is a "word"?), fix scary markup, add section to TOC.
...
llvm-svn: 45150
2007-12-18 06:18:21 +00:00
Chris Lattner
dcb7cc59ae
Fix an nice and subtle parser bug reported by Nico Weber.
...
llvm-svn: 45149
2007-12-18 06:06:23 +00:00
Steve Naroff
b723564c79
Add DefaultFunctionArrayConversion() to the indirection operator in Sema::ActOnUnaryOp().
...
This fixes a bug Chris forwarded from Oliver Hunt...
typedef struct { char name[100]; } entry;
char f1(entry *e) { return *e->name; }
llvm-svn: 45148
2007-12-18 04:06:57 +00:00
Christopher Lamb
ac7d631ed2
Don't forget to print address space qualifiers when printing out the type table! Thanks to Gordon Henriksen for pointing this out.
...
llvm-svn: 45147
2007-12-18 03:49:35 +00:00
Steve Naroff
b74406ba98
Fixe bogus error for variable argument methods. Sema::ObjcGetTypeForMethodDefinition() wasn't preserving the isVariadic boolean. Another fix is to avoid synthsizing the function decl entirely, however this is a separate issue that I don't want to deal with now. Also added a FIXME to Sema::CheckFunctionCall(), which is currently emitting a bogus warning.
...
llvm-svn: 45146
2007-12-18 03:41:15 +00:00
Anders Carlsson
aa5c91980e
Turns out the LLVMFoldingBuilder can fold InsertElement. Knowing this, we can get rid of our special casing of constants when creating vectors.
...
llvm-svn: 45145
2007-12-18 02:45:33 +00:00
Dale Johannesen
a56aab57e9
Testcase for preceding FE fix
...
llvm-svn: 45144
2007-12-18 01:58:38 +00:00
Steve Naroff
1d2538cb4d
Improve how we find private method decls. This involved:
...
- Changed Sema::ObjcActOnStartOfMethodDef() to register the methods with the global pools.
- Changed Sema::ActOnInstanceMessage() to look in global pools (should be much less error prone).
- Added a test case to message.m (for lookup that was broken).
Misc changes while I was investigating this...
- Changed Sema::ActOnAtEnd() to call AddFactoryMethodToGlobalPool (this looked like a cut/paste error).
- Added a comment and tweaked another where I was using the first person.
llvm-svn: 45142
2007-12-18 01:30:32 +00:00
Chris Lattner
52a9e40789
add a missed case.
...
llvm-svn: 45141
2007-12-18 01:19:18 +00:00
Evan Cheng
a8288f4294
Remove int_x86_sse2_movl_dq. It's replaced with a string compare.
...
llvm-svn: 45140
2007-12-18 01:04:25 +00:00
Evan Cheng
61eacb9048
These have matching builtin's in 4.2.
...
llvm-svn: 45139
2007-12-18 00:52:20 +00:00
Chris Lattner
b8be97e239
introduce a new CodeGenModule::getIntrinsic method, which wraps
...
Intrinsic::getDeclaration, allowing much more terse code.
llvm-svn: 45136
2007-12-18 00:25:38 +00:00
Steve Naroff
2050b0d05a
Add __private_extern__ keyword and recognize it. Added a FIXME to indicate there is still work to do.
...
llvm-svn: 45135
2007-12-18 00:16:02 +00:00
Scott Michel
8172f85e2f
i32 immediate constant test case for CellSPU
...
llvm-svn: 45134
2007-12-17 23:45:52 +00:00
Bill Wendling
34cc217741
s/hasSideEffects/hasUnmodelledSideEffects/g
...
llvm-svn: 45133
2007-12-17 23:19:54 +00:00
Bill Wendling
b3d85a5d4b
Add "mayHaveSideEffects" and "neverHasSideEffects" flags to some instructions. I
...
based what flag to set on whether it was already marked as
"isRematerializable". If there was a further check to determine if it's "really"
rematerializable, then I marked it as "mayHaveSideEffects" and created a check
in the X86 back-end similar to the remat one.
llvm-svn: 45132
2007-12-17 23:07:56 +00:00
Evan Cheng
0e179d015f
Bring back int_x86_sse2_movl_dq intrinsic for backward compatibility. Make sure
...
it's auto-upgraded to a shufflevector instruction.
llvm-svn: 45131
2007-12-17 22:33:23 +00:00
Scott Michel
c5cccb9e60
- Restore some i8 functionality in CellSPU
...
- New test case: nand.ll
llvm-svn: 45130
2007-12-17 22:32:34 +00:00
Ted Kremenek
bd5362511d
Modified Deserializer::ReadCStr to allow C-strings to be read into a
...
std::vector<char> starting from any index in the vector.
llvm-svn: 45129
2007-12-17 22:25:12 +00:00
Bill Wendling
a2401be121
LD_Fp64m should have "isRematerializable" set.
...
llvm-svn: 45128
2007-12-17 22:17:14 +00:00
Bill Wendling
d5477afc1b
Add "hasSideEffects" method to MachineInstrInfo class.
...
llvm-svn: 45126
2007-12-17 21:53:30 +00:00
Fariborz Jahanian
9b482ba9ec
Fixed a comment describing a function
...
llvm-svn: 45125
2007-12-17 21:48:49 +00:00
Chris Lattner
619e18cce2
implement HeaderMap::LookupFile. I think headermaps are done now. All that is
...
left is this crazy thing called "testing".
llvm-svn: 45124
2007-12-17 21:38:04 +00:00
Bill Wendling
842ddea5e4
Add MachineLICM.cpp
...
llvm-svn: 45123
2007-12-17 21:14:45 +00:00
Chris Lattner
9f9a619a9f
implement enough helper functions to successfully dump out the
...
contents of the header map. Look ma, no assumptions about input data
here (aka, corrupt header maps can't crash the compiler - crazy thought).
llvm-svn: 45122
2007-12-17 21:06:11 +00:00
Fariborz Jahanian
24cb52c9b0
Patch to implemented objective-c's dynamic object pointer qualified with
...
the protocol list (id<P,...> types).
llvm-svn: 45121
2007-12-17 21:03:50 +00:00
Bill Wendling
939526a930
As per feedback, revised comments to (hopefully) make the different side effect
...
flags clearer.
llvm-svn: 45120
2007-12-17 21:02:07 +00:00
Chris Lattner
a0943c36ed
Targets.cpp is gone.
...
llvm-svn: 45119
2007-12-17 20:56:50 +00:00
Chris Lattner
e6a76da763
Make the insertion point with an explicit new instead of the builder.
...
llvm-svn: 45118
2007-12-17 20:50:59 +00:00
Ted Kremenek
a59e0064d3
Removed CFG.cpp's dependence on #including iostream.
...
llvm-svn: 45116
2007-12-17 19:35:20 +00:00
Devang Patel
725b73ff42
Add cast operators in LLVMFoldingBuilder.
...
Patch by Richard Pennington.
llvm-svn: 45115
2007-12-17 19:06:26 +00:00
Ted Kremenek
3fbeaea7ee
Modified format-string checking to not emit a warning when all of the
...
following hold:
(1) A vprintf-like function is called that takes the argument list via a
via_list argument.
(2) The format string is a non-literal that is the parameter value of
the enclosing function, e.g:
void logmessage(const char *fmt,...) {
va_list ap;
va_start(ap,fmt);
fprintf(fmt,ap); // Do not emit a warning.
}
In the future this special case will be enhanced to consult the "format"
attribute attached to a function declaration instead of just allowing a blank
check for all function parameters to be used as format strings to vprintf-like
functions. This will happen when more support for attributes becomes
available.
llvm-svn: 45114
2007-12-17 19:03:13 +00:00
Chris Lattner
d39b8c0269
simplify some code, using new scoped_ptr support. Fix a bug in the
...
cross-endianness case, where we checked the version in the wrong endianness.
Amusingly, the GCC logic that detects mixed endianness hmaps and rejects
them is dead for this very reason.
llvm-svn: 45113
2007-12-17 18:59:44 +00:00
Chris Lattner
4d5bcd938e
cleanup this code, making it more "llvm-like".
...
Add comments to reset indicating that it deletes its pointer.
Add a new take() method, which can be used to get the pointer
without it being deleted.
llvm-svn: 45112
2007-12-17 18:58:23 +00:00
Chris Lattner
79764a6bee
Finish hooking up the scaffolding for headermaps. They can now do everything
...
except resolve lookups.
llvm-svn: 45111
2007-12-17 18:44:09 +00:00
Ted Kremenek
ea63b1575c
Format string checker: asprintf does not pass argumnents via va_list.
...
llvm-svn: 45110
2007-12-17 18:38:31 +00:00
Chris Lattner
4ffe46cbdf
Start reading the headermap header, drop the 'errorstr' argument to
...
the create method.
llvm-svn: 45109
2007-12-17 18:34:53 +00:00
Duncan Sands
b5a79d0eaa
Make invokes of inline asm legal. Teach codegen
...
how to lower them (with no attempt made to be
efficient, since they should only occur for
unoptimized code).
llvm-svn: 45108
2007-12-17 18:08:19 +00:00
Fariborz Jahanian
77b713b5d3
Also fixed similar regression for class methods, as well as more indentations.
...
llvm-svn: 45107
2007-12-17 18:07:01 +00:00
Chris Lattner
8d720d083a
Sink getName into DirectoryLookup to simplify the client in clang.
...
llvm-svn: 45106
2007-12-17 17:57:27 +00:00
Fariborz Jahanian
5f6409532b
Fixed a regression caused by refactoring of some meta-data generation routines using iteratgors.
...
Also fixed indentation problems.
llvm-svn: 45105
2007-12-17 17:56:10 +00:00
Ted Kremenek
73e921fdf2
Fixed 80 col violation.
...
llvm-svn: 45104
2007-12-17 17:50:39 +00:00
Ted Kremenek
5aa66bdfd6
Added driver option -Wno-format-nonliteral to silence format string related
...
warnings. This flag is the inverse of to GCC's -Wformat-nonliteral option (in
the clang driver, these warnings are on by default).
Patch provided by Shantonu Sen.
llvm-svn: 45103
2007-12-17 17:50:07 +00:00
Chris Lattner
faebb62651
Unbreak -v with framework paths. Patch by Shantonu Sen.
...
llvm-svn: 45102
2007-12-17 17:42:26 +00:00
David Greene
71eae8a5ee
GLIBCXX_DEBUG fix. std::vector<>::end() is invalidated by erase.
...
llvm-svn: 45101
2007-12-17 17:42:03 +00:00
David Greene
c4a80fb574
Get rid of annoying spaces.
...
llvm-svn: 45100
2007-12-17 17:40:29 +00:00
David Greene
2a5967b36a
Fix GLIBCXX_DEBUG errors. Erase invalidates std::vector iterators
...
passed the erased element.
llvm-svn: 45099
2007-12-17 17:39:51 +00:00
Ted Kremenek
05821322b4
Fixed another case where sizeof() returns the size in bytes, not bits.
...
This parallels a previous patch (duplicate logic caused the bug to appear
in multiple locations):
r44316 (http://llvm.org/viewvc/llvm-project?rev=44316&view=rev ).
Patch provided by Nuno Lopes.
llvm-svn: 45098
2007-12-17 17:38:43 +00:00
Gordon Henriksen
557fb1451e
Disabling a RUN line that's broken until addrspace roundtrips
...
through llvm-as|llvm-dis.
llvm-svn: 45097
2007-12-17 16:09:28 +00:00
Gordon Henriksen
5a3fe03784
C and Ocaml bindings for address spaces, for that burgeoning market
...
for Ocaml-based compilers targeting embedded devices. :)
llvm-svn: 45096
2007-12-17 16:08:32 +00:00
Chris Lattner
1587e6db01
add headermap.cpp
...
llvm-svn: 45095
2007-12-17 08:22:46 +00:00
Chris Lattner
44bd21b7c1
finish stubbing out support for HeaderMap. Now we just need an implementation!
...
llvm-svn: 45094
2007-12-17 08:17:39 +00:00
Chris Lattner
712e3873a0
refactor an better comment framework lookup code. This moves it from
...
HeaderSearch into DirectoryLookup, as a particular framework lookup is
specific to the directory we are currently querying.
llvm-svn: 45093
2007-12-17 08:13:48 +00:00
Chris Lattner
f62f75895f
as it turns out, frameworks and headermaps are orthogonal. Make this so in
...
the internal representation. This also fixes a bug where -I foo -F foo would
not search foo as both a normal and framework include dir.
llvm-svn: 45092
2007-12-17 07:52:39 +00:00
Chris Lattner
dd00e625d2
add a portability fixme.
...
llvm-svn: 45091
2007-12-17 06:51:34 +00:00
Chris Lattner
3e206b3a0e
teach RemoveDuplicates about header maps.
...
llvm-svn: 45090
2007-12-17 06:44:29 +00:00
Chris Lattner
c4ba38ed1e
Step #1 in adding headermap support to clang.
...
llvm-svn: 45089
2007-12-17 06:36:45 +00:00
Chris Lattner
899ff4a26d
rearrange some code and make it more efficient.
...
llvm-svn: 45087
2007-12-17 05:59:27 +00:00
Chris Lattner
28c91c5f35
add a hack so that codegen doesn't abort on missing sema of initializers, now
...
we emit stuff like this:
abort on missing sema of initializers, now
we emit stuff like this:
t3.c:1:24: warning: cannot codegen this initializer yet
const char x[2][4] = { { 'a', 'b', '\0', '\0' }, { 'c', 'd', 'e', '\0' } };
^~~~~~~~~~~~~~~~~~~~~~~~
This should be removed when sema is finished.
llvm-svn: 45086
2007-12-17 05:17:42 +00:00
Christopher Lamb
083bb46370
regenerate.
...
llvm-svn: 45085
2007-12-17 01:17:35 +00:00
Christopher Lamb
edf0788758
Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
...
llvm-svn: 45082
2007-12-17 01:12:55 +00:00
Christopher Lamb
77560fbde7
Update to use new PointerType::getUnqual() api.
...
llvm-svn: 45081
2007-12-17 01:11:20 +00:00
Christopher Lamb
55c6d4f22f
Make it clear in the LangRef that allocation instructions only operated on the generic address space. Implement support in the verifier for ensuring this is true.
...
llvm-svn: 45080
2007-12-17 01:00:21 +00:00
Anders Carlsson
ca6bcae0be
Start generating SSE intrinsics.
...
llvm-svn: 45079
2007-12-16 22:33:50 +00:00
Steve Naroff
eaaae467c7
Sema::ActOnMemberReferenceExpr() needs to perform the default conversions.
...
Bug and test case provided by Carl Lewis.
llvm-svn: 45078
2007-12-16 21:42:28 +00:00
Duncan Sands
56ed48036b
Revert this part of r45073 until the verifier is
...
changed not to reject invoke of inline asm.
llvm-svn: 45077
2007-12-16 21:01:21 +00:00
Chris Lattner
2af27c202c
don't violate C TBAA rules, use FloatToBits instead.
...
llvm-svn: 45076
2007-12-16 20:41:33 +00:00
Chris Lattner
e3b05fe31b
fix a questionable cast, thanks to Mike Stump for pointing this out.
...
llvm-svn: 45075
2007-12-16 20:26:54 +00:00
Chris Lattner
dab6bd902e
Fix the JIT encoding of cmp*ss, which aborts with this assertion currently:
...
X86CodeEmitter.cpp:378: failed assertion `0 && "Immediate size not set!"'
I *think* this is right, but Evan, please verify. It also looks like
CMPSDrr and maybe others are missing this info. Evan, plz investigate.
llvm-svn: 45074
2007-12-16 20:12:41 +00:00
Duncan Sands
8e4847ee95
Make instcombine promote inline asm calls to 'nounwind'
...
calls. Remove special casing of inline asm from the
inliner. There is a potential problem: the verifier
rejects invokes of inline asm (not sure why). If an
asm call is not marked "nounwind" in some .ll, and
instcombine is not run, but the inliner is run, then
an illegal module will be created. This is bad but
I'm not sure what the best approach is. I'm tempted
to remove the check in the verifier...
llvm-svn: 45073
2007-12-16 15:51:49 +00:00
Bill Wendling
fcf2085731
Remove spurious warnings from GCC:
...
warning: suggest a space before ';' or explicit braces around empty
body in 'for' statement
Patch by Mike Stump (modified slightly by yours truly).
llvm-svn: 45071
2007-12-16 09:16:12 +00:00
Owen Anderson
7b8a741189
Break local interferences in StrongPHIElimination. One step closer...
...
llvm-svn: 45070
2007-12-16 05:44:27 +00:00
Owen Anderson
ccb3981256
A few more comments.
...
llvm-svn: 45069
2007-12-16 04:07:23 +00:00
Anton Korobeynikov
ce1489e575
Define addString() and lookup() out-of-line to dissuade the C++ compiler from inlining it.
...
llvm-svn: 45068
2007-12-16 01:36:16 +00:00
Anton Korobeynikov
fbb9e418b5
Provide GraphTraits and DOTGraphTraits interface for Trie.
...
Retoss private/public stuff.
Make copy ctor and operator= private.
llvm-svn: 45067
2007-12-16 01:27:04 +00:00
Anton Korobeynikov
06e60b714b
Constify graph arguments
...
llvm-svn: 45066
2007-12-16 00:42:19 +00:00
Chris Lattner
39911a2258
swtich to smallptrset, which is more efficient than std::set.
...
llvm-svn: 45065
2007-12-15 23:20:07 +00:00
Chris Lattner
d6658d932b
make clang -v output more similar to gcc's -v output.
...
llvm-svn: 45064
2007-12-15 23:11:06 +00:00
Anton Korobeynikov
659c3f8dd1
Use references in DF iterators. This eliminates copy-ctor calls on huge objects (graphs)
...
llvm-svn: 45063
2007-12-15 22:23:24 +00:00
Anders Carlsson
f5f6544edc
We now support all MMX intrinsics. SSE intrinsics are next.
...
llvm-svn: 45062
2007-12-15 21:23:30 +00:00
Chris Lattner
60a288ab19
simplify the interfaces to ProcessInputFile and InitializePreprocessor
...
llvm-svn: 45060
2007-12-15 20:48:40 +00:00
Duncan Sands
26d6539e70
These are more correctly called signaling NaNs.
...
llvm-svn: 45059
2007-12-15 17:37:40 +00:00
Evan Cheng
23d2d4dc6c
Make better use of instructions that clear high bits; fix various 2-wide shuffle bugs.
...
llvm-svn: 45058
2007-12-15 03:00:47 +00:00
Evan Cheng
cbeec14a6f
__builtin_ia32_movqv4si is now expanded to a shuffle.
...
llvm-svn: 45057
2007-12-15 02:54:12 +00:00
Ted Kremenek
56ba5b3931
Removed "isSizeOfExpr" mode from StmtIterator. It turned out not to be
...
so useful and introduced a few bugs.
llvm-svn: 45051
2007-12-15 00:39:18 +00:00
Scott Michel
0aa7133f82
Start committing working test cases for CellSPU.
...
llvm-svn: 45050
2007-12-15 00:38:50 +00:00
Ted Kremenek
3291844bf0
Added "mode" to StmtIterator to record if the expression being iterated
...
over is the subexpression of a sizeof(expression). Different clients
will wish to handle iteration over such subexpressions differently, and can
now easily query if they are iterating over such statements using the
StmtIterator's inSizeOfExpr().
llvm-svn: 45047
2007-12-14 23:40:56 +00:00
Steve Naroff
3ce37a6b8e
- Remove getInstanceMethods/getClassMethods API on ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCategoryDecl. These methods are replaced by the respective iterators on each class.
...
- Add getInstanceMethodForSelector to ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCatgoryDecl. This hook will do a "shallow" lookup. This is a convenience method that reducing some of the iterator usage.
- Various changes to convert all clients to the above API's...
llvm-svn: 45046
2007-12-14 23:37:57 +00:00
Ted Kremenek
85e45f278c
Added support to StmtIterator to traverse the size expression of a VLA type
...
declared in a sizeof. For example:
sizeof(int[foo()]);
the expression "foo()" is an expression that is executed during the evaluation
of sizeof.
llvm-svn: 45043
2007-12-14 22:52:23 +00:00
Evan Cheng
9556729128
Actually, MOVPQIto64mr is a dup of MOVPQI2QImr, MOV64toPQIrm is a dup of MOVQI2PQIrm.
...
llvm-svn: 45041
2007-12-14 20:08:14 +00:00
Evan Cheng
e28372c0d6
Fix (mem) <-> low 64-bits of xmm bugs pointed out by David Greene. Mac OS X Leopard assembler recognizes movq.
...
llvm-svn: 45040
2007-12-14 19:54:07 +00:00
Duncan Sands
1202d1b1c4
Teach the interpreter to read and write memory in the
...
endianness of the target not of the host. Done by the
simple expedient of reversing bytes for primitive types
if the host and target endianness don't match. This is
correct for integer and pointer types. I don't know if
it is correct for floating point types.
llvm-svn: 45039
2007-12-14 19:38:31 +00:00
Dale Johannesen
f7cefdd5f0
x86-32 long doubles are 4-byte aligned on the stack
...
for parameter passing (only for that, on Darwin).
llvm-svn: 45038
2007-12-14 19:25:34 +00:00
Evan Cheng
a56e6ff9a7
Fix bsf / bsr jit encoding.
...
llvm-svn: 45037
2007-12-14 18:49:43 +00:00
Evan Cheng
f28c810036
Oops. Forgot these.
...
llvm-svn: 45036
2007-12-14 18:25:34 +00:00
Anders Carlsson
4d3094a9bb
Simplify the vector code. Add more shift intrinsics.
...
llvm-svn: 45035
2007-12-14 17:48:24 +00:00
Dan Gohman
8a332b235d
Add explicit keywords, and fix a minor typo that they uncovered.
...
llvm-svn: 45034
2007-12-14 15:41:34 +00:00
Dan Gohman
11352df8e4
Don't redirect stderr when it isn't needed.
...
llvm-svn: 45033
2007-12-14 15:15:11 +00:00
Dan Gohman
6869bfc351
Fix a typo in a comment.
...
llvm-svn: 45032
2007-12-14 15:13:08 +00:00
Dan Gohman
4069a593cc
Fix a typo in a comment.
...
llvm-svn: 45031
2007-12-14 15:11:58 +00:00
Dan Gohman
9d2e9e376f
Fix Intel asm syntax for the bsr and bsf instructions.
...
llvm-svn: 45030
2007-12-14 15:10:00 +00:00
Evan Cheng
0e6408124e
Fix ctlz and cttz. llvm definition requires them to return number of bits in of the src type when value is zero.
...
llvm-svn: 45029
2007-12-14 08:30:15 +00:00
Evan Cheng
0fcf56f8f5
Bug fix. Must also match ResNo when matching an operand with a user.
...
llvm-svn: 45028
2007-12-14 08:25:15 +00:00
Anders Carlsson
f924f34b6b
All MMX shift instructions took a <2 x i32> vector as the shift amount parameter. Change this to be <1 x i64> instead, which matches the assembler instruction.
...
llvm-svn: 45027
2007-12-14 06:38:54 +00:00
Kevin
c3286e9cef
IE Menu Problem...
...
Originally, I included CSS hacks for IE.
However, my comments before the doctype was the reason IE was running in non-strict mode. I did not know this.
When Chris removed the comments, IE correctly went into strict mode and my IE hacks were no longer needed (the hacks were getting in the way now).
solution:
*) Make sure doctype is first on all files
*) removed all IE hacks from menu.css (since the doctype issue fixes IE)
llvm-svn: 45025
2007-12-14 05:47:49 +00:00
Evan Cheng
e9fbc3f014
Implement ctlz and cttz with bsr and bsf.
...
llvm-svn: 45024
2007-12-14 02:13:44 +00:00
Seo Sanghyeon
d4d8c3c717
Array subscription in aggregate expression
...
llvm-svn: 45023
2007-12-14 02:04:12 +00:00
Bill Wendling
cb77f04e1f
Add flags to indicate that there are "never" side effects or that there "may be"
...
side effects for machine instructions.
llvm-svn: 45022
2007-12-14 01:48:59 +00:00
Seo Sanghyeon
3abb6d8435
Implement dereference operator in aggregate expression
...
llvm-svn: 45020
2007-12-14 01:09:11 +00:00
Ted Kremenek
7d9a2e119d
CFG bug fix: for sizeof(expressions), don't expand the control-flow
...
of "expressions", since they are not really evaluated.
llvm-svn: 45015
2007-12-13 22:44:18 +00:00
Fariborz Jahanian
c47dc4f5af
Patch to make ObjcQualifiedInterfaceType inherit ObjcInterfaceType
...
llvm-svn: 45014
2007-12-13 20:47:42 +00:00
Dan Gohman
d4551fd0a4
Make it more clear that some things that can't be done in .td files can
...
still be done in the LLVM code generator. And update the summary for the
X86 target.
llvm-svn: 45013
2007-12-13 20:43:47 +00:00
Steve Naroff
d78c81b6de
Sema::ActOnFinishFunctionBody(): Since we no longer synthesize a FunctionDecl for each method, remove the unconditional initialization to 0 and corresponding comment.
...
llvm-svn: 45008
2007-12-13 18:18:56 +00:00
Ted Kremenek
2f4ab7148c
Add hack to SourceManager to support missing source files during
...
deserialization. Eventually this should be replaced with a lazy-reading
mechanism that only reads source files when they are needed by clients.
llvm-svn: 45007
2007-12-13 18:12:10 +00:00
Ted Kremenek
31dcdb312b
Add check in the driver to see if a serialized AST file has been successfully
...
deserialized.
llvm-svn: 45006
2007-12-13 18:11:11 +00:00
Ted Kremenek
685dc9b56e
Changed set of top-level decls from a list to a vector.
...
llvm-svn: 45005
2007-12-13 17:54:02 +00:00
Ted Kremenek
15ddcef648
Changed -serialize-ast to not create a temporary directory, but instead
...
create a .ast file in the current working directory. This mirrors the behavior
of the -c option for gcc. Later we should add the ability to write the
serialized file anywhere.
llvm-svn: 45004
2007-12-13 17:50:11 +00:00
Chris Lattner
60af5f3b82
Set target data layout info in module.
...
llvm-svn: 45003
2007-12-13 17:34:31 +00:00
Chris Lattner
69b9ea5afa
typo
...
llvm-svn: 45002
2007-12-13 17:27:09 +00:00
Chris Lattner
2048b067a6
debug info too.
...
llvm-svn: 45001
2007-12-13 17:25:36 +00:00
Ted Kremenek
9f5ad6c795
Minor spelling; punctuation correction.
...
llvm-svn: 45000
2007-12-13 16:41:01 +00:00
Wojciech Matyjewicz
86d51b896e
Make these loops follow GetGEPOperands() behavior.
...
Let: %q = GEP %p, X, ...
If %p is a GEP, we can chase baseptr further, only if X==0.
llvm-svn: 44999
2007-12-13 16:22:58 +00:00
Bill Wendling
a5be19d3df
Grammar fix: correct ' usage.
...
llvm-svn: 44998
2007-12-13 09:57:40 +00:00
Evan Cheng
2011df4e39
Fix typo.
...
llvm-svn: 44997
2007-12-13 07:50:36 +00:00
Chris Lattner
eb13c73c36
minor cleanups
...
llvm-svn: 44996
2007-12-13 07:47:54 +00:00
Chris Lattner
54424ad69c
add some builtins.
...
llvm-svn: 44995
2007-12-13 07:41:58 +00:00
Chris Lattner
13653d7668
simplify some code.
...
llvm-svn: 44994
2007-12-13 07:34:23 +00:00
Chris Lattner
3c1334013d
Don't do integer promotions of LHS for compound shift assignment. The LHS has to be a modifiable lvalue.
...
llvm-svn: 44993
2007-12-13 07:28:16 +00:00
Chris Lattner
d7b5a9aa1a
remove some dead styles.
...
llvm-svn: 44992
2007-12-13 06:55:59 +00:00
Chris Lattner
d9c10096d7
nuke hte status page.
...
llvm-svn: 44991
2007-12-13 06:55:02 +00:00
Chris Lattner
196a226567
add a bunch of open projects
...
llvm-svn: 44990
2007-12-13 06:41:15 +00:00
Ted Kremenek
136a37f1eb
Updated serialization of ParmVarDecl to serialize out objcDeclQualifier.
...
Previously this field was serialized out in VarDecl (a parent class), but
now the field belongs to ParmVarDecl.
llvm-svn: 44989
2007-12-13 06:28:13 +00:00
Chris Lattner
a5b4965c0e
split get_involved into two pages: get_started and get_involved.
...
llvm-svn: 44988
2007-12-13 06:20:15 +00:00
Owen Anderson
53b677e4e8
Add register pairs to the list to check for local interferences.
...
llvm-svn: 44987
2007-12-13 05:53:03 +00:00
Owen Anderson
1f93edd08a
Remove ugly and horrible code. It's not necessary for correctness, and can be added back later if it causes code quality issues.
...
llvm-svn: 44986
2007-12-13 05:43:37 +00:00
Chris Lattner
8610d2de02
wrap to 80 cols, many fixes to markup.
...
llvm-svn: 44985
2007-12-13 05:42:27 +00:00
Ted Kremenek
3a742d280c
For uninitialized values analysis, added special treatment for declarations
...
of array types. For things like:
char x[10];
we should treat "x" as being initialized, because the variable "x" really
refers to the memory block of the array. Clearly x[1] is uninitialized, but
expressions like "(char*) x" really do refer to an initialized value. This
simple dataflow analysis does not reason about the contents of arrays.
This fixes: PR 1859 (http://llvm.org/bugs/show_bug.cgi?id=1859 )
llvm-svn: 44984
2007-12-13 05:14:22 +00:00
Chris Lattner
2fe0dd09b3
Fix file header.
...
llvm-svn: 44983
2007-12-13 05:02:35 +00:00
Ted Kremenek
78dcda6059
Fixed bug in live-variable analysis and uninitialized-values analysis where
...
we incorrectly examine the expression within a sizeof() for use in computing
dataflow values.
This fixes: PR 1858 (http://llvm.org/bugs/show_bug.cgi?id=1858 )
llvm-svn: 44982
2007-12-13 04:47:15 +00:00
Evan Cheng
37c36ed79a
Be extra careful with extension use optimation. Now turned on by default.
...
llvm-svn: 44981
2007-12-13 03:32:53 +00:00
Nate Begeman
23ffde507f
Apply CBE/MSIL patch to autoconf
...
llvm-svn: 44980
2007-12-13 02:24:45 +00:00
Nate Begeman
938d8cb8d9
Add install-libs target which only installs libraries, not tools
...
llvm-svn: 44979
2007-12-13 02:17:17 +00:00
Chris Lattner
52a6f82d0f
use new interface.
...
llvm-svn: 44978
2007-12-13 02:05:09 +00:00
Zhou Sheng
461d8419a7
Remove this testcase as it will always fail on
...
platform like Darwin.
llvm-svn: 44977
2007-12-13 02:03:57 +00:00
Chris Lattner
67671ed4b7
add a helper method.
...
llvm-svn: 44976
2007-12-13 01:59:49 +00:00
Devang Patel
527048247b
Add assert to detect incomplete implementation work.
...
llvm-svn: 44974
2007-12-13 01:24:16 +00:00
Nate Begeman
272ee458cf
Do not build CBackend and MSIL regardless of configured targets
...
llvm-svn: 44973
2007-12-13 01:18:52 +00:00
Fariborz Jahanian
885890a47a
Moved ObjcDeclQualifier to ParmVarDecl from VarDecl.
...
Ted, this change necessitates (de)/serialization of ParmVarDecl.
llvm-svn: 44972
2007-12-13 00:54:18 +00:00
Evan Cheng
827d30db19
Fold some and + shift in x86 addressing mode.
...
llvm-svn: 44970
2007-12-13 00:43:27 +00:00
Evan Cheng
687567bca5
Oops. Forgot these.
...
llvm-svn: 44969
2007-12-13 00:42:35 +00:00
Chris Lattner
70efff25be
builtin id 0 is invalid, don't use a slot for it.
...
llvm-svn: 44968
2007-12-13 00:38:03 +00:00
Ted Kremenek
ce8d55b087
Implemented -serialize-ast option for the driver. This is not really tested
...
and is a work in progress.
llvm-svn: 44967
2007-12-13 00:37:31 +00:00
Fariborz Jahanian
56637d127f
Fixed test to match the new diagnostic text.
...
llvm-svn: 44966
2007-12-13 00:16:34 +00:00
Chris Lattner
f0fbf077d2
Fix for edge profiling, patch by 'Marc' for PR1857
...
llvm-svn: 44965
2007-12-13 00:04:46 +00:00
Fariborz Jahanian
4d1288a67e
Concatenation of objc strings.
...
llvm-svn: 44964
2007-12-12 23:55:49 +00:00
Chris Lattner
b8bd2db8b3
fix off-by-one error.
...
llvm-svn: 44963
2007-12-12 23:46:36 +00:00
Ted Kremenek
8fdd3d95eb
Implemented prototype mode where the driver can operate on serialized ASTs
...
instead of source files.
llvm-svn: 44962
2007-12-12 23:41:08 +00:00
Evan Cheng
7df585d9c4
Cosmetic change.
...
llvm-svn: 44961
2007-12-12 23:15:59 +00:00
Evan Cheng
6e68381e02
Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable and they should not be spilled.
...
llvm-svn: 44960
2007-12-12 23:12:09 +00:00
Duncan Sands
fde556745b
Remove host endianness info from TargetData and
...
put it in a new header System/Host.h instead.
Instead of getting the endianness from configure,
calculate it directly.
llvm-svn: 44959
2007-12-12 23:03:45 +00:00
Ted Kremenek
1daa3cfbae
TargetInfo no longer includes a reference to SourceManager.
...
Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:
FullLoc.getManager().someMethod(FullLoc.getLocation());
instead we have:
FullLoc.someMethod();
Modified TextDiagnostics (and related classes) to use this short-hand.
llvm-svn: 44957
2007-12-12 22:39:36 +00:00
Steve Naroff
f44cb63859
Encode enumeral types.
...
llvm-svn: 44956
2007-12-12 22:30:11 +00:00
Dan Gohman
015982aa32
Remove a forward-declaration for a non-existant class.
...
llvm-svn: 44955
2007-12-12 22:25:09 +00:00
Dan Gohman
7a7742c2fe
Allow vector integer constants to be created with
...
SelectionDAG::getConstant, in the same way as vector floating-point
constants. This allows the legalize expansion code for @llvm.ctpop and
friends to be usable with vector types.
llvm-svn: 44954
2007-12-12 22:21:26 +00:00
Ted Kremenek
9b7632eef8
Removed "NULL" from default construction of FullSourceLoc (compilation errors on
...
some systems).
llvm-svn: 44953
2007-12-12 19:39:40 +00:00
Anton Korobeynikov
7ab71379b6
Use vector for child storage instead of map. This will also make
...
our life during future GraphTraits'ing slightly easier.
llvm-svn: 44952
2007-12-12 19:08:44 +00:00
Ted Kremenek
f82942d04c
constified getFullLoc().
...
llvm-svn: 44951
2007-12-12 18:55:29 +00:00
Ted Kremenek
febe89a6da
Changes to FullSourceLoc:
...
- Added cstor that takes no arguments to create an "invalid" location.
- Removed non-const version of getSourceManager().
- Renamed getSourceManager() to getManager.
- Remover operator SourceLocatio().
llvm-svn: 44950
2007-12-12 18:54:21 +00:00
Ted Kremenek
50d23f007f
Renamed getFullSourceLoc() -> getFullLoc().
...
llvm-svn: 44949
2007-12-12 18:46:37 +00:00
Ted Kremenek
d8bcfe27cc
Added method: Preprocessor::getFullSourceLoc. Used by clients of Preprocessor
...
to get a FullSourceLoc from a SourceLocation.
llvm-svn: 44948
2007-12-12 18:41:40 +00:00
Ted Kremenek
23e2085701
Renamed FullContextSourceLocation to FullSourceLoc.
...
llvm-svn: 44947
2007-12-12 18:32:04 +00:00
Ted Kremenek
8d03cf953b
Added utility static method to FullContextSourceLocation
...
for creating "invalid" location objects.
llvm-svn: 44946
2007-12-12 18:20:34 +00:00
Chris Lattner
83021e92ba
make it a bit more clear in what way the ivar is consistent.
...
llvm-svn: 44945
2007-12-12 18:19:52 +00:00
Chris Lattner
85332c7534
add an ivar_size() method that never returns -1.
...
llvm-svn: 44944
2007-12-12 18:19:33 +00:00
Ted Kremenek
ea6999a1a5
Constified a predicate method.
...
llvm-svn: 44943
2007-12-12 18:18:05 +00:00
Ted Kremenek
fd5e5c4704
Added class FullContextSourceLocation: a tuple class that
...
contains both a SourceLocation and its associated
SourceManager. This class is useful for argument passing to
functions that expect both objects.
llvm-svn: 44942
2007-12-12 18:16:46 +00:00
Chris Lattner
0f29d98419
simplify some code, bump j. This fixes the remaining test failures.
...
llvm-svn: 44941
2007-12-12 18:11:49 +00:00
Ted Kremenek
6f6ff37b04
Moved construction of TargetInfo objects out of the Driver
...
and into the "Basic" library. TargetInfo objects are now
constructed from triples by calling the static method
TargetInfo::CreateTargetInfo.
llvm-svn: 44940
2007-12-12 18:05:32 +00:00
Chris Lattner
dd2bffdd0b
handle the -1'ness of undefined lists
...
llvm-svn: 44939
2007-12-12 18:02:31 +00:00
Chris Lattner
061227aa59
unbreak the build. I'm still working on test failures.
...
llvm-svn: 44938
2007-12-12 17:58:05 +00:00
Duncan Sands
9ab0943b86
Revert r44626, which turned off the use of readonly
...
and readnone for functions with bodies because it
broke llvm-gcc-4.2 bootstrap. It turns out that,
because of LLVM's array_ref hack, gcc was computing
pure/const attributes wrong (now fixed by turning
off the gcc ipa-pure-const pass).
llvm-svn: 44937
2007-12-12 16:01:40 +00:00
Wojciech Matyjewicz
309e5a723b
1. "Upgrage" comments.
...
2. Using zero-extended value of Scale and unsigned division is safe provided
that Scale doesn't have the sign bit set.
Previously these 2 instructions:
%p = bitcast [100 x {i8,i8,i8}]* %x to i8*
%q = getelementptr i8* %p, i32 -4
were combined into:
%q = getelementptr [100 x { i8, i8, i8 }]* %x, i32 0,
i32 1431655764, i32 0
what was incorrect.
llvm-svn: 44936
2007-12-12 15:21:32 +00:00
Christopher Lamb
17c405d29e
Regenerate.
...
llvm-svn: 44934
2007-12-12 08:45:45 +00:00
Christopher Lamb
25f5076612
Implement part of review feedback for address spaces.
...
llvm-svn: 44933
2007-12-12 08:44:39 +00:00
Chris Lattner
7354e6a50e
fix typo
...
llvm-svn: 44932
2007-12-12 08:17:45 +00:00
Chris Lattner
30d23e8289
more cleanups changing things like getInstanceVariables to iterators.
...
llvm-svn: 44930
2007-12-12 07:56:42 +00:00
Evan Cheng
0f42730722
Use shuffles to implement insert_vector_elt for i32, i64, f32, and f64.
...
llvm-svn: 44929
2007-12-12 07:55:34 +00:00
Evan Cheng
0a1254f634
Add a test case for -optimize-ext-uses.
...
llvm-svn: 44928
2007-12-12 07:54:08 +00:00
Chris Lattner
31bc07e6cf
resolve some fixmes and clean up some code by eliminating the get*Vars apis to some classes and use iterators instead.
...
llvm-svn: 44927
2007-12-12 07:46:12 +00:00
Chris Lattner
854f3167c0
start cleaning up interfaces for objc bits and pieces by switching to an
...
iterator interface.
llvm-svn: 44926
2007-12-12 07:30:05 +00:00
Chris Lattner
da463fe7c1
split objc pieces of SemaDecl.cpp out into SemaDeclObjC.cpp
...
llvm-svn: 44925
2007-12-12 07:09:47 +00:00
Ted Kremenek
433a492f53
Added back VisitDeclStmt() to the StmtDumper, essentially reverting r44920:
...
http://llvm.org/viewvc/llvm-project?rev=44920&view=rev
Putting VisitDeclStmt() was motivated because it called DumpDeclarator(),
which printed out a little bit more information than just using the
child_iterator interface to visit the subexpressions of DeclStmt. To avoid
printing the initializers twice, DumpSubTree() now specially checks for
DeclStmts; in such cases it calls VisitDeclStmt() without using the
child_iterators to visit the subexpressions.
llvm-svn: 44924
2007-12-12 06:59:42 +00:00
Chris Lattner
61511e12e0
move function to a more logical location, add its grammar productions.
...
llvm-svn: 44923
2007-12-12 06:56:32 +00:00
Chris Lattner
074f325746
remove todo
...
llvm-svn: 44922
2007-12-12 06:54:22 +00:00
Evan Cheng
2a98956796
Lower a build_vector with all constants into a constpool load unless it can be done with a move to low part.
...
llvm-svn: 44921
2007-12-12 06:45:40 +00:00
Ted Kremenek
ee1a988bf6
Removed VisitDeclStmt(). The initializers of a DeclStmt are now automatically
...
printed out by DumpSubTree() via the child_iterator interface. This fixes a
bug where the initializers were being dumped twice.
llvm-svn: 44920
2007-12-12 06:44:12 +00:00
Chris Lattner
6d513f37c9
Unbreak -stats on cocoa.h
...
llvm-svn: 44919
2007-12-12 06:43:05 +00:00
Chris Lattner
b011825453
add run lines.
...
llvm-svn: 44918
2007-12-12 06:22:14 +00:00
Chris Lattner
58c8be81bb
add run line
...
llvm-svn: 44917
2007-12-12 06:20:40 +00:00
Chris Lattner
2fbe8e98c4
add runline, make this test real.
...
llvm-svn: 44916
2007-12-12 06:20:18 +00:00
Chris Lattner
e01fc281c3
verify that tests contain RUN lines.
...
llvm-svn: 44915
2007-12-12 06:19:22 +00:00
Zhou Sheng
3115ba39e8
Add a guard to cxxabi header as other platform may
...
not support it.
llvm-svn: 44914
2007-12-12 06:16:47 +00:00
Chris Lattner
840e05ba11
simplify some code.
...
llvm-svn: 44913
2007-12-12 06:13:27 +00:00
Chris Lattner
5c11c41203
implement correct semantic analysis for shifts. For:
...
int test(int x, long long y) {
return x << y;
}
we now realize the type of the shift is int, not long long.
This fixes a fixme from june.
llvm-svn: 44912
2007-12-12 05:47:28 +00:00
Chris Lattner
2d39e07112
Simplify some code, don't force the triple to a darwin triple if non-darwin.
...
llvm-svn: 44911
2007-12-12 05:01:48 +00:00
Zhou Sheng
ed5d693d67
Fixed PR1629.
...
Make lli interpreter correctly call external functions sin()/cos(),
__cxa_guard_acquire() and __cxa_guard_release().
llvm-svn: 44910
2007-12-12 04:55:43 +00:00
Chris Lattner
b8877d9c6d
typo reported by Gabor Greif
...
llvm-svn: 44909
2007-12-12 04:22:37 +00:00
Chris Lattner
c6208a72f7
Fix a codegen crash on test/CodeGen/cast.c, reported by Keith.
...
llvm-svn: 44908
2007-12-12 04:13:20 +00:00
Chris Lattner
b3ba3d9827
Fix a bug in my previous patch, thanks to Jay Foad for
...
pointing this out and correcting the patch!
llvm-svn: 44907
2007-12-12 03:56:54 +00:00
Chris Lattner
4ebd7c2c19
fix typo pointed out by gordon
...
llvm-svn: 44906
2007-12-12 03:33:41 +00:00
Evan Cheng
63d33cfd2b
Don't muck with phi nodes; bug fixes.
...
llvm-svn: 44905
2007-12-12 02:53:41 +00:00
Scott Michel
4a8bc7e105
Correct typo for Linux: s/esp/%rsp/
...
llvm-svn: 44904
2007-12-12 02:38:28 +00:00
Bill Wendling
bf85dd4f61
Bit masks conflicted. Needed to bump them by one.
...
llvm-svn: 44903
2007-12-12 01:51:58 +00:00
Owen Anderson
499e5bffcf
Forgot to remove a register from the PHI-union after I'd determined that it
...
interfered with other registers. Seems like that might be a good thing to do. :-)
llvm-svn: 44902
2007-12-12 01:25:08 +00:00
Chris Lattner
47fbe949c4
fix expected errors.
...
llvm-svn: 44901
2007-12-12 01:15:04 +00:00
Fariborz Jahanian
27c15cca19
Add -pedantic so test passes.
...
llvm-svn: 44900
2007-12-12 01:06:09 +00:00
Gordon Henriksen
0a68fe2ffc
Add (very basic) bindings for ModuleProvider.
...
llvm-svn: 44899
2007-12-12 01:04:30 +00:00
Chris Lattner
e002fbea56
Add ObjC parser support for concatenated ObjC strings. Note that
...
this is passed to sema and ignored there, so the second part of the
string will not make it into the AST. Passing to Fariborz to finish
Sema + AST construction.
llvm-svn: 44898
2007-12-12 01:04:12 +00:00
Fariborz Jahanian
c98d956778
Implemented type checking for pointer of objects of protocol-qualified types.
...
Note that incompatible-protocol-qualified-types.m is currently failing. This is
unrelated to this patch and Steve is looking at the general problem of not reporting
incompitible pointer types in return stetement..
llvm-svn: 44897
2007-12-12 01:00:23 +00:00
Evan Cheng
7bc8942532
Bug fix. Only safe to perform extension uses optimization if the source of extension is also defined in the same BB as the extension.
...
llvm-svn: 44896
2007-12-12 00:51:06 +00:00
Daniel Berlin
0af43a1895
Changes from Curtis Dunham implementing lazy cycle detection algorithm.
...
Changes from me implementing different way of representing points-to anything.
Changes from me that improve slightly on LCD.
llvm-svn: 44895
2007-12-12 00:37:04 +00:00
Evan Cheng
6766d2fa4f
If deleting a reload instruction due to reuse (value is available in register R and reload is targeting R), make sure to invalidate the kill information of the last kill.
...
llvm-svn: 44894
2007-12-11 23:36:57 +00:00
Ted Kremenek
fc095b1669
Moved creation of SourceManager, HeaderSearch, TargetInfo, and LangOptions
...
into the loop that processes input files. These will soon become translation
unit specific (with the exception of LangOptions).
llvm-svn: 44893
2007-12-11 23:28:38 +00:00
Bill Wendling
38236ef6cb
Need to grow the indexed map. Added debug statements.
...
llvm-svn: 44892
2007-12-11 23:27:51 +00:00
Chris Lattner
f641255a86
simplify code now that isConstantExpr really does always
...
return a loc.
llvm-svn: 44890
2007-12-11 23:15:04 +00:00
Chris Lattner
255e1323f3
Fix a case where we'd return "is not a constant expr" without
...
return a location.
llvm-svn: 44889
2007-12-11 23:11:17 +00:00
Fariborz Jahanian
16e703ade5
80-column please.
...
llvm-svn: 44888
2007-12-11 23:04:08 +00:00
Ted Kremenek
89fbadd3be
Modified the internals of Diagnostic and DiagnosticClient to use
...
SourceManager*'s instead of SourceManager&'s. This allows the client specify a
NULL SourceManager when using a default constructed SourceLocation. Thus the
SourceManager can be NULL when the SourceLocation's isValid() == false.
The interface to most clients of Diagnostic remains the same.
Diagnostic::Report() is overload to either accept a SourceLocation and a
SourceManager&, or neither. Thus clients that do not have a SourceManager
cannot specify a SourceLocation.
Modified TextDiagnostics* to use this new interface.
Modified the driver to not passed in SourceManager when warning about "-I-".
llvm-svn: 44887
2007-12-11 22:57:35 +00:00
Fariborz Jahanian
4e56ed5fab
Implemented rewriting of protocol-qualified global variable types.
...
Re-implemented some of rewriting of protocol-qualified function
argument types to support it in its generality.
llvm-svn: 44886
2007-12-11 22:50:14 +00:00
Chris Lattner
3487a3009b
gcc supports more targets.
...
llvm-svn: 44885
2007-12-11 22:32:45 +00:00
Chris Lattner
95f80da9fb
update pch discussion
...
llvm-svn: 44884
2007-12-11 22:29:38 +00:00
Chris Lattner
a6b103a3c3
improve title
...
llvm-svn: 44883
2007-12-11 22:26:03 +00:00
Chris Lattner
6931189378
add a con of clang vs gcc
...
llvm-svn: 44882
2007-12-11 22:22:59 +00:00
Bill Wendling
642e15a7cb
Simplify slightly.
...
llvm-svn: 44881
2007-12-11 22:22:22 +00:00
Anton Korobeynikov
7f01ebefc6
Remove Trie::Edge class. Now edge labels are stored into nodes itself.
...
llvm-svn: 44880
2007-12-11 21:55:38 +00:00
Devang Patel
b37b12d102
Match union field type when member expression is u->x
...
llvm-svn: 44879
2007-12-11 21:33:16 +00:00
Ted Kremenek
d4e5fbacab
Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now
...
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.
Modified all users of Diagnostics to comply with this new interface.
Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).
Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.
llvm-svn: 44878
2007-12-11 21:27:55 +00:00
Owen Anderson
f24dd1c1eb
More progress on StrongPHIElimination. Now we actually USE the DomForest!
...
llvm-svn: 44877
2007-12-11 20:12:11 +00:00
Fariborz Jahanian
c86ee9ce90
Refactor Rewritetest::RewriteObjcQualifiedInterfaceTypes in preparation for more
...
general use.
llvm-svn: 44876
2007-12-11 19:56:36 +00:00
Devang Patel
e3f9fa6322
Refactor bit-field handling code into a separate method.
...
No functionality change.
llvm-svn: 44875
2007-12-11 19:51:39 +00:00
Bill Wendling
b678ae7c38
Blark! How in the world did this work without this?!
...
llvm-svn: 44874
2007-12-11 19:40:06 +00:00
Bill Wendling
7717a8a37d
- Update the virtual reg to machine instruction map when hoisting.
...
- Fix subtle bug when creating initially creating this map.
llvm-svn: 44873
2007-12-11 19:17:04 +00:00
Fariborz Jahanian
3b5dca2533
For @optional unimplemented methods do not issue the warning.
...
llvm-svn: 44872
2007-12-11 19:10:26 +00:00
Bill Wendling
5143d898c8
Checking for "zero operands" during the "CanHoistInst()" method isn't necessary
...
because those with side effects will be caught by other checks in here.
Also, simplify the check for a BB in a sub loop.
llvm-svn: 44871
2007-12-11 18:45:11 +00:00
Fariborz Jahanian
251a943ce9
Fixed a parsing bug whereby @optional/@required keyword is not followed by
...
a method declaration.
llvm-svn: 44870
2007-12-11 18:34:51 +00:00
Nate Begeman
6dc8b4ed13
Allow the JIT to encode MMX instructions
...
llvm-svn: 44869
2007-12-11 18:06:14 +00:00
Wojciech Matyjewicz
5bf9f01349
Use correct member access operator.
...
(my test commit as well)
llvm-svn: 44868
2007-12-11 17:46:25 +00:00
Dan Gohman
5e1f8472d2
Rename these tests to use the appropriate suffixes.
...
llvm-svn: 44867
2007-12-11 15:55:52 +00:00
Dan Gohman
b582867567
Use not instead of ignore when an exit status is expected to always
...
be non-zero.
llvm-svn: 44866
2007-12-11 15:50:23 +00:00
Dan Gohman
cfed707c12
Don't redirect stderr when it isn't needed.
...
llvm-svn: 44865
2007-12-11 15:41:11 +00:00
Duncan Sands
f41217d4fa
Fix compilation.
...
llvm-svn: 44864
2007-12-11 12:20:47 +00:00
Christopher Lamb
595798f041
Update credits.
...
llvm-svn: 44861
2007-12-11 09:32:07 +00:00
Christopher Lamb
308121c757
Add information on address space qualifiers for pointer types and global
...
declarations to the LangRef.
llvm-svn: 44860
2007-12-11 09:31:00 +00:00
Christopher Lamb
e92cba4535
Regenerate.
...
llvm-svn: 44859
2007-12-11 09:02:08 +00:00
Christopher Lamb
54dd24c2a7
Implement address space attribute for LLVM pointer types. Address spaces are
...
regions of memory that have a target specific relationship, as described in the
Embedded C Technical Report.
This also implements the 2007-12-11-AddressSpaces test,
which demonstrates how address space attributes can be used in LLVM IR.
In addition, this patch changes the bitcode signature for stores (in a backwards
compatible manner), such that the pointer type, rather than the pointee type, is
encoded. This permits type information in the pointer (e.g. address space) to be
preserved for stores.
LangRef updates are forthcoming.
llvm-svn: 44858
2007-12-11 08:59:05 +00:00
Chris Lattner
8975f49065
mention pork
...
llvm-svn: 44857
2007-12-11 07:59:50 +00:00
Chris Lattner
8e6a8f984c
Teach VMCore to constant fold shufflevectors with constant operands.
...
This allows us to compile:
#include <emmintrin.h>
typedef __m128i VSInt16;
typedef short vSInt16 __attribute__ ((__vector_size__ (16)));
VSInt16 t3() {
return (VSInt16)((vSInt16)_mm_set1_epi16(6518));
}
into:
_t3:
movaps LCPI1_0, %xmm0
ret
instead of:
_t3:
movl $6518, %eax
movd %eax, %xmm0
pextrw $0, %xmm0, %eax
xorps %xmm0, %xmm0
pinsrw $0, %eax, %xmm0
punpcklwd %xmm0, %xmm0
pshufd $0, %xmm0, %xmm0
ret
llvm-svn: 44856
2007-12-11 07:49:37 +00:00
Chris Lattner
6a6b3fb62b
Implement constant folding if vector<->vector bitcasts where the number
...
of source/dest elements changes. This implements
test/Transforms/InstCombine/bitcast-vector-fold.ll
llvm-svn: 44855
2007-12-11 07:29:44 +00:00
Reid Spencer
0b1df1d3da
Don't have APInt.cpp depend upon DerivedTypes.h. This helps with splitting the
...
Support libraries separately into their own module.
llvm-svn: 44852
2007-12-11 06:53:58 +00:00
Anton Korobeynikov
3d23737c5f
Add first and really dirty version of generic Trie structure
...
llvm-svn: 44851
2007-12-11 06:53:44 +00:00
Chris Lattner
5c6399eee6
significantly simplify some code, no functionality change.
...
llvm-svn: 44850
2007-12-11 06:07:39 +00:00
Chris Lattner
e8ea0374ac
refactor some code, no functionality change.
...
llvm-svn: 44849
2007-12-11 05:55:02 +00:00
Chris Lattner
29a16af8de
properly namespacify.
...
llvm-svn: 44845
2007-12-11 04:36:28 +00:00
Chris Lattner
63ba2c06c4
fix a build issue with non-apple-gcc-4.0 compilers.
...
llvm-svn: 44844
2007-12-11 04:33:00 +00:00
Steve Naroff
5cace62e66
Avoid the first person in a recently added comment.
...
llvm-svn: 44843
2007-12-11 03:38:03 +00:00
Steve Naroff
3f1223cb06
- Tweak several tests to be compatible with my last commit.
...
- Add a test to message.m for an unusual case for GCC compat (as suggested by Chris).
llvm-svn: 44842
2007-12-11 03:34:41 +00:00
Anders Carlsson
f1c18350e3
Generate more builtins.
...
llvm-svn: 44841
2007-12-11 03:09:22 +00:00
Steve Naroff
c30dcf1251
Change err_undef_protocolref to warn_undef_protocolref (this is consistent with GCC).
...
llvm-svn: 44840
2007-12-11 02:44:30 +00:00
Anders Carlsson
eee7566205
Generate code for some more intrinsics.
...
llvm-svn: 44839
2007-12-11 02:25:54 +00:00
Evan Cheng
303417d242
Switch over to MachineLoopInfo.
...
llvm-svn: 44838
2007-12-11 02:09:15 +00:00
Evan Cheng
f54030231e
Pretty print shuffle mask operand.
...
llvm-svn: 44837
2007-12-11 02:08:35 +00:00
Evan Cheng
4fbf459549
- Improved v8i16 shuffle lowering. It now uses pshuflw and pshufhw as much as
...
possible before resorting to pextrw and pinsrw.
- Better codegen for v4i32 shuffles masquerading as v8i16 or v16i8 shuffles.
- Improves (i16 extract_vector_element 0) codegen by recognizing
(i32 extract_vector_element 0) does not require a pextrw.
llvm-svn: 44836
2007-12-11 01:46:18 +00:00
Nate Begeman
a55a67ae91
x86 doesn't actually want to custom lower v3i32
...
llvm-svn: 44835
2007-12-11 01:41:33 +00:00
Chris Lattner
11fbda2b5a
Reimplement support for strings that initialize global inits now that
...
the types are right in sema. Thanks Steve.
llvm-svn: 44834
2007-12-11 01:38:45 +00:00
Devang Patel
7ae82e7305
Separate access field number is not required.
...
llvm-svn: 44833
2007-12-11 01:23:33 +00:00
Devang Patel
113bd8be70
Beautify comment.
...
llvm-svn: 44831
2007-12-11 00:54:19 +00:00
Devang Patel
ab6aadb34a
Add support to share llvm fields for bit-fields.
...
For example, struct { char a; short b:2; };
llvm-svn: 44830
2007-12-11 00:49:18 +00:00
Gordon Henriksen
7843c16f31
CollectorMetadata and Collector are rejiggered to get along with
...
per-function collector model. Collector is now the factory for
CollectorMetadata, so the latter may be subclassed.
llvm-svn: 44827
2007-12-11 00:30:17 +00:00
Gordon Henriksen
a87d72b102
Project file maintenance.
...
llvm-svn: 44826
2007-12-11 00:29:16 +00:00
Chris Lattner
2945c46e93
Move TargetData::hostIsLittleEndian out of line, which means we
...
don't have to #include config.h in it. #including config.h breaks
other projects that have their own autoconf stuff and try to #include
the llvm headers. One obscure example is llvm-gcc.
llvm-svn: 44825
2007-12-11 00:28:59 +00:00
Gordon Henriksen
2b0eed278b
Adding Ocaml bindings for the bitreader as requested by Sarah
...
Thompson. Usage should be something like this:
open Llvm
open Llvm_bitreader
match read_bitcode_file fn with
| Bitreader_failure msg ->
prerr_endline msg
| Bitreader_success m ->
...;
dispose_module m
Compile with: ocamlc llvm.cma llvm_bitreader.cma
ocamlopt llvm.cmxa llvm_bitreader.cmxa
llvm-svn: 44824
2007-12-11 00:20:48 +00:00
Steve Naroff
f727faf2ed
Explicitly set the string literal type from "char *" to "constant array of char".
...
At this point, I am fairly certain the front-end is correct. Unfortunately, the back-end is still unhappy.
That said, I've commented out the two lines in globalinit.c that are causing problems.
Chris, please have a look...thanks!
llvm-svn: 44823
2007-12-11 00:00:01 +00:00
Ted Kremenek
c0870605be
Fixed bug in CFG::PopulateBlkExprMap where the ordering
...
between fetching the size of the expression map (for use as
the next integer id for an Expr*) and the creation of the
entry in the map could be non-deterministic. This could
cause the size of the map to be incremented prior to the
index being determine.
On Linux the map entry would be created first, causing the
map to the "size" to be incremented prior to it being
queried. On Mac OS X we had the reverse behavior. Now the
size is always queried prior to the new id being inserted
into the map.
This was the real cause of the bit-overrun triggered in
PR 1847:
http://llvm.org/bugs/show_bug.cgi?id=1847
Also reverted the change in patch 44813, which was a bogus
fix to this problem:
http://llvm.org/viewvc/llvm-project?rev=44813&view=rev
llvm-svn: 44822
2007-12-10 23:58:39 +00:00
Ted Kremenek
f182e81d85
Added missing inclusion of stdarg.h. Now CGExprScalar.cpp
...
compiles again on Linux.
llvm-svn: 44821
2007-12-10 23:44:32 +00:00
Anton Korobeynikov
21ade5880b
Hey, English is not my native language :)
...
llvm-svn: 44820
2007-12-10 23:10:20 +00:00
Anton Korobeynikov
77eb5e649d
Clarify the need of CFI() stuff
...
llvm-svn: 44819
2007-12-10 23:08:35 +00:00
Anton Korobeynikov
a6b0f7e244
Provide convenient way to disable CFI stuff for old/broken assemblers.
...
Use it for Darwin.
llvm-svn: 44818
2007-12-10 23:04:38 +00:00
Chris Lattner
d2265b45ae
Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
...
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe. While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".
llvm-svn: 44817
2007-12-10 22:53:04 +00:00
Steve Naroff
91f78080e3
Add support for initializing char arrays from string literals.
...
Adapted from a patch by Anders Carlsson.
llvm-svn: 44816
2007-12-10 22:44:33 +00:00
Ted Kremenek
9a698a1da7
Added two bounds checks to the BitVector class to detect
...
out-of-bounds bit accesses. The checks are only performed
in a Debug build.
llvm-svn: 44815
2007-12-10 22:28:35 +00:00
Chris Lattner
ea9ac34d18
split isBinaryOp into a static and member version.
...
llvm-svn: 44814
2007-12-10 22:18:53 +00:00
Ted Kremenek
b4785e3054
Fixed off-by-one-error when resizing Bitvectors used for
...
dataflow analysis over expressions and decls.
This should fix bug 1847:
http://llvm.org/bugs/show_bug.cgi?id=1847
Thanks to Török Edwin for providing a test case that
identified the problem.
llvm-svn: 44813
2007-12-10 22:01:22 +00:00
John Criswell
fa06f0203b
Fix some wording.
...
llvm-svn: 44810
2007-12-10 20:26:29 +00:00
Chris Lattner
433fb26707
add support for implicit cast from array to pointer that is not the element
...
type.
llvm-svn: 44809
2007-12-10 19:50:32 +00:00
Anders Carlsson
d0113e4be3
Revert change that broke the build.
...
llvm-svn: 44808
2007-12-10 19:46:20 +00:00
Chris Lattner
e665077f9a
disable case that makes this fail.
...
llvm-svn: 44807
2007-12-10 19:44:50 +00:00
Anders Carlsson
b9eb82c3ee
Add EmitShuffleVector helper method.
...
llvm-svn: 44806
2007-12-10 19:35:18 +00:00
Chuck Rose III
900a13e82c
Add StringPool + new CodeGen files to win32 build
...
llvm-svn: 44805
2007-12-10 19:31:09 +00:00
Anders Carlsson
dc16e8f299
Address comments from Chris.
...
llvm-svn: 44804
2007-12-10 19:30:18 +00:00
Chris Lattner
8a72a7d586
Disable cfi directives for now, darwin does't support them.
...
These should probably be something like:
CFI(".cfi_def_cfa_offset 16\n")
where CFI is defined to a noop on darwin and other platforms
that don't support those directives.
llvm-svn: 44803
2007-12-10 19:10:18 +00:00
Duncan Sands
9f76be61d1
Make PruneEH update the nounwind/noreturn attributes
...
on functions as it calculates them.
llvm-svn: 44802
2007-12-10 19:09:40 +00:00
Chris Lattner
456078d50d
minor edits.
...
llvm-svn: 44801
2007-12-10 18:56:37 +00:00
Devang Patel
b3ae8d7dc2
Add assert to flag incomplete bit-field support.
...
llvm-svn: 44800
2007-12-10 18:52:06 +00:00
Devang Patel
3c31b54b47
Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
...
llvm-svn: 44799
2007-12-10 18:37:40 +00:00
Devang Patel
bb5c0d8960
Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
...
llvm-svn: 44798
2007-12-10 18:25:34 +00:00
Ted Kremenek
256a15d532
Added newline to end of file.
...
llvm-svn: 44797
2007-12-10 18:01:25 +00:00
Duncan Sands
5c65cb4633
Fix PR1836: in the interpreter, read and write apints
...
using the minimum possible number of bytes. For little
endian targets run on little endian machines, apints are
stored in memory from LSB to MSB as before. For big endian
targets on big endian machines they are stored from MSB to
LSB which wasn't always the case before (if the target and
host endianness doesn't match values are stored according
to the host's endianness). Doing this requires knowing the
endianness of the host, which is determined when configuring -
thanks go to Anton for this. Only having access to little
endian machines I was unable to properly test the big endian
part, which is also the most complicated...
llvm-svn: 44796
2007-12-10 17:43:13 +00:00
Chris Lattner
80c54698e8
be more clear about what we are comparing.
...
llvm-svn: 44795
2007-12-10 17:38:50 +00:00
Anton Korobeynikov
657be86229
And finally annotate X86-64 version of callback.
...
All bad stuff from SSE version is implicitely inherited :)
llvm-svn: 44794
2007-12-10 15:27:07 +00:00
Anton Korobeynikov
88e9d082d8
Provide annotation for SSE version of callback. It's even more
...
broken, because doesn't mark xmm regs properly
llvm-svn: 44793
2007-12-10 15:13:55 +00:00
Anton Korobeynikov
81e9dc4af7
Annotate JIT callback function with call frame infromation.
...
This will allow us (theoretically) to unwind through JITer.
The code wasn't verified, so I'm pretty sure offsets are wrong :)
llvm-svn: 44792
2007-12-10 14:54:42 +00:00
Duncan Sands
81b25817f9
It looks like this has been broken for some time -
...
get it to compile.
llvm-svn: 44791
2007-12-10 14:43:10 +00:00
Anders Carlsson
1b9853a9f8
Forgot this file.
...
llvm-svn: 44790
2007-12-10 08:48:18 +00:00
Chris Lattner
c3307e2418
fixes, thanks to Nico Weber
...
llvm-svn: 44789
2007-12-10 08:21:12 +00:00
Chris Lattner
428760a6e6
clean up the TOC.
...
llvm-svn: 44788
2007-12-10 08:19:29 +00:00
Chris Lattner
e396aaae28
finish the features description.
...
llvm-svn: 44787
2007-12-10 08:12:49 +00:00
Owen Anderson
ba61806ef1
A little more progress on StrongPHIElimination, now that I have a better sense of
...
how the CodeGen machinery works.
llvm-svn: 44786
2007-12-10 08:07:09 +00:00
Christopher Lamb
d202e03fe5
Improve branch folding by recgonizing that explict successor relationships impact the value of fall-through choices.
...
llvm-svn: 44785
2007-12-10 07:24:06 +00:00
Chris Lattner
b6a8cfea24
now with hackability.
...
llvm-svn: 44784
2007-12-10 07:23:52 +00:00
Chris Lattner
aa085d36e2
reorganize features, expound on a couple more.
...
llvm-svn: 44783
2007-12-10 07:14:08 +00:00
Chris Lattner
e404df76c0
incorporate suggestions from Joel Nelson.
...
llvm-svn: 44782
2007-12-10 06:01:32 +00:00
Chris Lattner
f572f3364d
start making features be a more detailed description of the features/goals section on the main page.
...
llvm-svn: 44781
2007-12-10 05:52:05 +00:00
Chris Lattner
27a2709cfb
add toc
...
llvm-svn: 44780
2007-12-10 05:23:01 +00:00
Chris Lattner
b072569682
don't duplicate goals on the features page.
...
llvm-svn: 44779
2007-12-10 05:20:47 +00:00
Chris Lattner
ab44e15ce7
update status
...
llvm-svn: 44778
2007-12-10 05:11:40 +00:00
Chris Lattner
fdfd014270
edits, switch the goals/why section.
...
llvm-svn: 44777
2007-12-10 05:10:14 +00:00
Chris Lattner
5a7359c8c2
minor edits
...
llvm-svn: 44776
2007-12-10 05:06:15 +00:00
Gordon Henriksen
4b904b9627
Delete the CollectorNamePool if it should become empty.
...
llvm-svn: 44775
2007-12-10 03:35:18 +00:00
Gordon Henriksen
dc5cafb74e
Fix a typo spotted by Nick Lewycky.
...
llvm-svn: 44774
2007-12-10 03:30:21 +00:00
Gordon Henriksen
71183b6739
Adding a collector name attribute to Function in the IR. These
...
methods are new to Function:
bool hasCollector() const;
const std::string &getCollector() const;
void setCollector(const std::string &);
void clearCollector();
The assembly representation is as such:
define void @f() gc "shadow-stack" { ...
The implementation uses an on-the-side table to map Functions to
collector names, such that there is no overhead. A StringPool is
further used to unique collector names, which are extremely
likely to be unique per process.
llvm-svn: 44769
2007-12-10 03:18:06 +00:00
Chris Lattner
e31cd5b564
add link to comparison page.
...
llvm-svn: 44763
2007-12-10 02:25:51 +00:00
Chris Lattner
609f9ccb2c
Be more positive! Add to sidebar.
...
llvm-svn: 44762
2007-12-10 02:24:44 +00:00
Chris Lattner
10ebf4dcb1
updates.
...
llvm-svn: 44761
2007-12-10 02:18:15 +00:00
Gordon Henriksen
14a5569f4e
Reverting dtor devirtualization patch.
...
_sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed
_sabre_: the vtable lives to fight another day
llvm-svn: 44760
2007-12-10 02:14:30 +00:00
Chris Lattner
3fbe73bef2
minor edits
...
llvm-svn: 44759
2007-12-10 02:05:32 +00:00
Chris Lattner
cf7cb4bbdd
make more positive.
...
llvm-svn: 44758
2007-12-10 01:52:24 +00:00
Chris Lattner
12f9855a42
remove some dead code.
...
llvm-svn: 44757
2007-12-10 01:51:38 +00:00
Chris Lattner
13daba07d9
fix some warnings.
...
llvm-svn: 44756
2007-12-10 01:51:22 +00:00
Chris Lattner
d05f4ba524
Fix a big problem in the recent dtor refactoring work, now it passes 2007-11-19-InlineAsm.ll
...
llvm-svn: 44755
2007-12-10 01:48:29 +00:00
Chris Lattner
78eeea2ce9
Add a "comparing clang to other compilers" page, to help resolve some FAQ's.
...
llvm-svn: 44754
2007-12-10 01:44:24 +00:00
Chris Lattner
7f0ad21480
lots of this is done.
...
llvm-svn: 44753
2007-12-10 00:14:49 +00:00
Chris Lattner
cb04ac9599
abort when we lower an initializer to the wrong type, as we currently do for:
...
char text[] = "string";
llvm-svn: 44752
2007-12-10 00:05:55 +00:00
Chris Lattner
686628e052
extend or truncate the initializer for a string initializer to match its type.
...
llvm-svn: 44751
2007-12-10 00:00:56 +00:00
Chris Lattner
c25c42f3ca
Implement codegen support for:
...
char text[8] = "string";
Big fixme remains.
llvm-svn: 44750
2007-12-09 23:49:42 +00:00
Anders Carlsson
92c4e44da1
Address Chris's comments.
...
llvm-svn: 44749
2007-12-09 23:39:18 +00:00
Anders Carlsson
895af08562
Move target specific builtin IDs to TargetBuiltins.h so that they can be used by CGBuiltin.cpp
...
llvm-svn: 44748
2007-12-09 23:17:02 +00:00
Gordon Henriksen
3e5be66ccb
Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
...
llvm-svn: 44747
2007-12-09 22:46:10 +00:00
Chris Lattner
4d62f42eba
Implement correct semantic analysis of subtractions, implementing
...
C99 6.5.6.
llvm-svn: 44746
2007-12-09 21:53:25 +00:00
Anders Carlsson
8e1d8cf241
Implement __builtin_ia32_mulps.
...
llvm-svn: 44745
2007-12-09 21:51:19 +00:00
Anders Carlsson
a020c43034
Generate code for target specific intrinsics.
...
llvm-svn: 44744
2007-12-09 21:20:04 +00:00
Chris Lattner
3ed83c1c0f
The flags on tokens indicate whether they are the start of a *physical* line,
...
not the start of a logical line. Be careful about this distinction, which
affects when newlines are printed and when paste-avoidance happens, etc.
This fixes PR1848, thanks to Neil for noticing this!
llvm-svn: 44743
2007-12-09 21:11:08 +00:00
Chris Lattner
84f450789a
Fix a pretty big but subtle bug counting the number of newlines to emit.
...
This would cause us to emit different code (in -E mode) for these two files:
---
#define t(x) x
t(a
3)
---
#define t(x) x
t(a
3)
---
In one case, -E would print "a\n3", in the other it printed "a3". Now
it prints "a3" for both.
This is part of PR1848.
llvm-svn: 44742
2007-12-09 20:45:43 +00:00
Chris Lattner
615315f307
Add dumping support for locations, make -dumptokens print out the location
...
info of each token.
llvm-svn: 44741
2007-12-09 20:31:55 +00:00
Chris Lattner
64443973c0
Duncan points out that the subtraction is unneeded since hte code
...
knows the vector is not pow2
llvm-svn: 44740
2007-12-09 17:56:34 +00:00
Chris Lattner
93cd101e5c
Fix typo noticed by Nico Weber
...
llvm-svn: 44739
2007-12-09 17:50:14 +00:00
Gordon Henriksen
ad80af9677
Upgrading this test to 2.0 .ll syntax.
...
llvm-svn: 44738
2007-12-09 15:03:01 +00:00
Chris Lattner
7566350b74
many edits to the main page, add a prominant 'status' section.
...
llvm-svn: 44737
2007-12-09 09:05:23 +00:00
Chris Lattner
d93d0fc79a
unindent, don't zap whitespace before/after paragraphs.
...
llvm-svn: 44736
2007-12-09 08:40:26 +00:00
Chris Lattner
dffc79530a
simplify the menu css, make it a bit more attractive.
...
llvm-svn: 44735
2007-12-09 08:38:01 +00:00
Chris Lattner
fc3b9bfea8
cleanup some markup, e.g. & -> &
...
llvm-svn: 44734
2007-12-09 08:17:09 +00:00
Chris Lattner
3f42d12072
Fix PR1782, patch by Wojtek Matyjewicz!
...
llvm-svn: 44733
2007-12-09 07:35:13 +00:00
Gordon Henriksen
76c5dfd7df
Fix a very silly typo.
...
llvm-svn: 44732
2007-12-09 01:12:08 +00:00
Chris Lattner
9c4aad2dba
avoid ///usr/include/foo.h, patch by Sean Middleditch
...
llvm-svn: 44731
2007-12-09 00:39:55 +00:00
Chris Lattner
283d094b75
implement support for functions that initialize globals.
...
llvm-svn: 44730
2007-12-09 00:36:01 +00:00
Chris Lattner
ad6094ddd3
Fix accidental commit by Bill.
...
llvm-svn: 44729
2007-12-09 00:27:38 +00:00
Chris Lattner
69d3298777
Add support for splitting the operand of a return instruction.
...
llvm-svn: 44728
2007-12-09 00:06:19 +00:00
Bill Wendling
3f19dfe794
Reverting 44702. It wasn't correct to rename them.
...
llvm-svn: 44727
2007-12-08 23:58:46 +00:00
Chris Lattner
e48fc80446
add many new cases to SplitResult. SplitResult now handles all the cases that LegalizeDAG does.
...
llvm-svn: 44726
2007-12-08 23:58:27 +00:00
Chris Lattner
de9046af54
Implement splitting support for store, allowing us to compile:
...
%f8 = type <8 x float>
define void @test_f8(%f8* %P, %f8* %Q, %f8* %S) {
%p = load %f8* %P ; <%f8> [#uses=1]
%q = load %f8* %Q ; <%f8> [#uses=1]
%R = add %f8 %p, %q ; <%f8> [#uses=1]
store %f8 %R, %f8* %S
ret void
}
into:
_test_f8:
movaps 16(%rdi), %xmm0
addps 16(%rsi), %xmm0
movaps (%rdi), %xmm1
addps (%rsi), %xmm1
movaps %xmm0, 16(%rdx)
movaps %xmm1, (%rdx)
ret
llvm-svn: 44725
2007-12-08 23:24:26 +00:00
Chris Lattner
de87224cd9
implement vector splitting of load, undef, and binops.
...
llvm-svn: 44724
2007-12-08 23:08:49 +00:00
Chris Lattner
1ef437d4e1
implement some methods.
...
llvm-svn: 44723
2007-12-08 22:40:18 +00:00
Chris Lattner
a5e7db115e
add scaffolding for splitting of vectors.
...
llvm-svn: 44722
2007-12-08 22:37:41 +00:00
Nate Begeman
b52ad35bc4
Project cleanups
...
llvm-svn: 44721
2007-12-08 22:29:19 +00:00
Chris Lattner
5c62ba5fb8
Remove dead file and directory.
...
llvm-svn: 44720
2007-12-08 22:17:33 +00:00
Chris Lattner
8c8eaf6b92
reorganize header to separate into functional blocks.
...
llvm-svn: 44719
2007-12-08 21:59:32 +00:00
Chris Lattner
4063bd6eae
split scalarization out to its own file.
...
llvm-svn: 44718
2007-12-08 20:30:28 +00:00
Chris Lattner
5c7c46baaf
Split expansion out into its own file.
...
llvm-svn: 44717
2007-12-08 20:27:32 +00:00
Chris Lattner
029c816460
Split promotion support out to its own file.
...
llvm-svn: 44716
2007-12-08 20:24:38 +00:00
Chris Lattner
757d4beba9
Rename LegalizeDAGTypes.cpp -> LegalizeTypes.cpp
...
llvm-svn: 44715
2007-12-08 20:17:13 +00:00
Chris Lattner
92288147b6
Split the class definition of DAGTypeLegalizer out into a header.
...
Leave it visibility hidden, but not in an anon namespace.
llvm-svn: 44714
2007-12-08 20:16:06 +00:00
Gordon Henriksen
e33aec0dd6
Incorporating review feedback from Reid.
...
llvm-svn: 44713
2007-12-08 20:10:40 +00:00
Anders Carlsson
050f494f66
Add getTargetPrefix to TargetInfo, to be used with target specific intrinsics.
...
llvm-svn: 44712
2007-12-08 19:32:57 +00:00
Chris Lattner
abef872bc0
remove dead #include.
...
llvm-svn: 44711
2007-12-08 19:06:21 +00:00
Chris Lattner
d58954b040
add #include
...
llvm-svn: 44710
2007-12-08 19:03:30 +00:00
Chris Lattner
31e0f1af67
eliminate dependency on Bitcode headers.
...
llvm-svn: 44709
2007-12-08 19:01:44 +00:00
Chris Lattner
c779e00f17
remove dead #include, APInt.h already has the needed forward decls.
...
llvm-svn: 44708
2007-12-08 19:00:38 +00:00
Chris Lattner
e5256754e7
proper #include order.
...
llvm-svn: 44707
2007-12-08 19:00:03 +00:00
Gordon Henriksen
0c428fe3ec
Ignoring generated files.
...
llvm-svn: 44706
2007-12-08 17:53:01 +00:00
Gordon Henriksen
4b41a6f529
Adding a StringPool data structure, which GC will use.
...
llvm-svn: 44705
2007-12-08 17:07:47 +00:00
Gordon Henriksen
05481d91be
Fix bug in constructing Ocaml option types in the bindings.
...
llvm-svn: 44704
2007-12-08 16:55:43 +00:00
Chris Lattner
ff87f05e43
aesthetic changes, no functionality change. Evan, it's not clear
...
what 'Available' is, please add a comment near it and rename it
if appropriate.
llvm-svn: 44703
2007-12-08 07:22:58 +00:00
Bill Wendling
2b07d8c5a0
Renaming:
...
isTriviallyReMaterializable -> hasNoSideEffects
isReallyTriviallyReMaterializable -> isTriviallyReMaterializable
llvm-svn: 44702
2007-12-08 07:17:56 +00:00
Chris Lattner
f47015bc74
Fix a significant code quality regression I introduced on PPC64 quite
...
a while ago. We now produce:
_foo:
mflr r0
std r0, 16(r1)
ld r2, 16(r1)
std r2, 0(r3)
ld r0, 16(r1)
mtlr r0
blr
instead of:
_foo:
mflr r0
std r0, 16(r1)
lis r0, 0
ori r0, r0, 16
ldx r2, r1, r0
std r2, 0(r3)
ld r0, 16(r1)
mtlr r0
blr
for:
void foo(void **X) {
*X = __builtin_return_address(0);
}
on ppc64.
llvm-svn: 44701
2007-12-08 07:04:58 +00:00
Chris Lattner
f6a8156e4f
implement __builtin_return_addr(0) on ppc.
...
llvm-svn: 44700
2007-12-08 06:59:59 +00:00
Chris Lattner
a6c8297e84
refactor some code to avoid overloading the name 'usesLR' in
...
different places to mean different things. Document what the
one in PPCFunctionInfo means and when it is valid.
llvm-svn: 44699
2007-12-08 06:39:11 +00:00
Chris Lattner
1ebfecc8d0
Implement correct isa<UnaryInstruction>, problem reported by "ST".
...
llvm-svn: 44697
2007-12-08 04:37:52 +00:00
Bill Wendling
4375173ba0
Incorporated comments from Evan and Chris:
...
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056043.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056048.html
llvm-svn: 44696
2007-12-08 01:47:01 +00:00
Owen Anderson
086b2c4537
Fix several cache coherence bugs in MemDep/GVN that were found. Also add some (disabled) debugging code
...
to make such problems easier to diagnose in the future, written by Duncan Sands.
llvm-svn: 44695
2007-12-08 01:37:09 +00:00
Evan Cheng
92105ac0cd
Doh
...
llvm-svn: 44694
2007-12-08 01:01:07 +00:00
Fariborz Jahanian
8ea0779624
Test case for my last patch for implementation of static protocoled type
...
used as reciver type of a message expression.
llvm-svn: 44693
2007-12-08 01:00:55 +00:00
Evan Cheng
cd6913627e
Fix a compilation warning.
...
llvm-svn: 44692
2007-12-08 01:00:31 +00:00
Evan Cheng
ab87e735cd
Fix a compilation warning.
...
llvm-svn: 44691
2007-12-08 01:00:21 +00:00
Chuck Rose III
c214d1605f
Adding MachineLoopInfo.h,.cpp and MachineLICP.cpp to VStudio build
...
llvm-svn: 44690
2007-12-08 00:53:13 +00:00
Steve Naroff
1f6ed92dbb
Omit the field name when including the super class structure template.
...
This allows us to access a superclasses ivars without deriving the absolute path.
The comments below say a bit more...
llvm-svn: 44688
2007-12-07 22:15:58 +00:00
Bill Wendling
fb706bc52b
Initial commit of the machine code LICM pass. It successfully hoists this:
...
_foo:
li r2, 0
LBB1_1: ; bb
li r5, 0
stw r5, 0(r3)
addi r2, r2, 1
addi r3, r3, 4
cmplw cr0, r2, r4
bne cr0, LBB1_1 ; bb
LBB1_2: ; return
blr
to:
_foo:
li r2, 0
li r5, 0
LBB1_1: ; bb
stw r5, 0(r3)
addi r2, r2, 1
addi r3, r3, 4
cmplw cr0, r2, r4
bne cr0, LBB1_1 ; bb
LBB1_2: ; return
blr
ZOMG!! :-)
Moar to come...
llvm-svn: 44687
2007-12-07 21:42:31 +00:00
Evan Cheng
b41d838d28
Add comment.
...
llvm-svn: 44686
2007-12-07 21:30:01 +00:00
Fariborz Jahanian
ff6a455c12
Implemented when static typing is combined with protocols and use as receiver
...
type.
llvm-svn: 44685
2007-12-07 21:21:21 +00:00
Steve Naroff
2c20c38ced
Have Sema::CheckConstantInitList skip semantic analysis when the element type is a record (until we implement the FIXME). This removes a bogus error for the following code...
...
snarofflocal% cat bug.m
#import <Foundation/NSGeometry.h>
#define NUMHELICOPTERRECTS 5
static NSRect helicopterRects[NUMHELICOPTERRECTS] = {
{{27, 0}, {18, 11}}, // Bottom
{{0, 8}, {4, 11}}, // Tail
{{0, 16}, {50, 1}},
{{22, 5}, {18, 12}}, // Body
{{0, 10}, {42, 3}}
};
llvm-svn: 44684
2007-12-07 21:12:53 +00:00
Steve Naroff
888f33cc44
Lookup methods in the global pool even when a statically typed object's class interface isn't in scope!
...
As the comment in the code indicates, I'm not fond of this. Nevertheless, gcc compat is a goal.
Here is the case I'm talking about...
#import <Foundation/Foundation.h>
@interface AnyClass : NSObject
- (NSRect)rect;
@end
@class Helicopter;
static void func(Helicopter *obj) {
NSRect r = [obj rect];
}
...before this patch, we would warn/error. With this patch, everything "just works".
llvm-svn: 44682
2007-12-07 20:41:14 +00:00
Fariborz Jahanian
33c0e815f3
Patch for rewriting of @protocol.
...
llvm-svn: 44681
2007-12-07 18:47:10 +00:00
Evan Cheng
bfd373a53e
Much improved v8i16 shuffles. (Step 1).
...
llvm-svn: 44676
2007-12-07 08:07:39 +00:00
Owen Anderson
b1d4fda856
Fix a stupid error that Chris pointed out.
...
llvm-svn: 44674
2007-12-07 04:04:55 +00:00
Steve Naroff
b2f8ff153d
Rewrite 'super' within a class method. This required some minor tweaks to the front-end.
...
llvm-svn: 44673
2007-12-07 03:50:46 +00:00
Evan Cheng
26593a04db
New test case.
...
llvm-svn: 44672
2007-12-07 01:48:46 +00:00
Evan Cheng
85cdba29b0
Add an option to control this heuristic tweak so I can test it.
...
llvm-svn: 44671
2007-12-07 00:28:32 +00:00
Fariborz Jahanian
2bbd03a755
Patch to implement "Protocol" as a built-in type declared as
...
"@class Protocol;"
llvm-svn: 44670
2007-12-07 00:18:54 +00:00
Evan Cheng
c829e5cdf0
Remove a bogus optimization. It's not possible to do a move to low element to a <8 x i16> or <16 x i8> vector.
...
llvm-svn: 44669
2007-12-06 22:14:22 +00:00
Evan Cheng
5cb41390ab
Fix a bogus test case.
...
llvm-svn: 44668
2007-12-06 22:12:45 +00:00
Anders Carlsson
10c6110fca
Add workaround to get test/Parser/compound_literal.c working again.
...
llvm-svn: 44666
2007-12-06 20:10:20 +00:00
Fariborz Jahanian
227c0d13bc
On Steve's suggestion, moved handling of use of undeclared method in a message
...
to rewriter (my previous patch).
llvm-svn: 44665
2007-12-06 19:49:56 +00:00
Devang Patel
65a2288eef
More struct bitfields layout work. Now handle,
...
struct STestB1 {char a; char b:2; } stb1;
struct STestB2 {char a; char b:5; char c:4} stb2;
llvm-svn: 44664
2007-12-06 19:16:05 +00:00
Dale Johannesen
5eff4de9c8
Redo previous patch so optimization only done for i1.
...
Simpler and safer.
llvm-svn: 44663
2007-12-06 17:53:31 +00:00
Fariborz Jahanian
6b644a6e05
test case for my very last patch.
...
llvm-svn: 44662
2007-12-06 17:43:04 +00:00
Chris Lattner
b36a98e9a3
Fix a bug handling typedefs of functions, patch by Nuno Lopes!
...
llvm-svn: 44661
2007-12-06 17:20:20 +00:00
Evan Cheng
8393dc7378
Turning simple splitting on. Start testing new coalescer heuristics as new llcbeta.
...
llvm-svn: 44660
2007-12-06 08:54:31 +00:00
Chris Lattner
eedaf92fcf
third time around: instead of disabling this completely,
...
only disable it if we don't know it will be obviously profitable.
Still fixme, but less so. :)
llvm-svn: 44658
2007-12-06 07:47:55 +00:00
Chris Lattner
b5fdfb9612
Actually, disable this code for now. More analysis and improvements to
...
the X86 backend are needed before this should be enabled by default.
llvm-svn: 44657
2007-12-06 07:44:31 +00:00
Chris Lattner
7c709a5d08
implement a readme entry, compiling the code into:
...
_foo:
movl $12, %eax
andl 4(%esp), %eax
movl _array(%eax), %eax
ret
instead of:
_foo:
movl 4(%esp), %eax
shrl $2, %eax
andl $3, %eax
movl _array(,%eax,4), %eax
ret
As it turns out, this triggers all the time, in a wide variety of
situations, for example, I see diffs like this in various programs:
- movl 8(%eax), %eax
- shll $2, %eax
- andl $1020, %eax
- movl (%esi,%eax), %eax
+ movzbl 8(%eax), %eax
+ movl (%esi,%eax,4), %eax
- shll $2, %edx
- andl $1020, %edx
- movl (%edi,%edx), %edx
+ andl $255, %edx
+ movl (%edi,%edx,4), %edx
Unfortunately, I also see stuff like this, which can be fixed in the
X86 backend:
- andl $85, %ebx
- addl _bit_count(,%ebx,4), %ebp
+ shll $2, %ebx
+ andl $340, %ebx
+ addl _bit_count(%ebx), %ebp
llvm-svn: 44656
2007-12-06 07:33:36 +00:00
Chris Lattner
d2bbbabbfb
simplify some code.
...
llvm-svn: 44655
2007-12-06 06:25:04 +00:00
Chris Lattner
42558bf664
implement the rest of the functionality from SelectionDAGLegalize::ScalarizeVectorOp
...
llvm-svn: 44654
2007-12-06 05:53:43 +00:00
Chris Lattner
9bc22b4838
make it more clear what 'foo' is
...
llvm-svn: 44653
2007-12-06 04:20:07 +00:00
Chuck Rose III
cc2a661322
Adjust VStudio files to add JITMemoryManager files + include <cassert> from same.
...
llvm-svn: 44651
2007-12-06 02:03:01 +00:00
Chris Lattner
0ccb663cca
move some ashr-specific code out of commonShiftTransforms into visitAShr.
...
llvm-svn: 44650
2007-12-06 01:59:46 +00:00
Dale Johannesen
05bbbda78a
Fix PR1842.
...
llvm-svn: 44649
2007-12-06 01:43:46 +00:00
Fariborz Jahanian
c277f6f351
A missing method in a messaging expression issues a warning, clients must not
...
crash because of this.
llvm-svn: 44648
2007-12-06 01:37:55 +00:00
Chris Lattner
7f3587e344
add a new ExecutionEngine::createJIT which can be used if you only want
...
to create a JIT. This lets you specify JIT-specific configuration items
like the JITMemoryManager to use.
llvm-svn: 44647
2007-12-06 01:34:04 +00:00
Chris Lattner
dc351b94f9
simplify creation of the interpreter, make ExecutionEngine ctor protected,
...
delete one ExecutionEngine ctor, minor cleanup.
llvm-svn: 44646
2007-12-06 01:08:09 +00:00
Chris Lattner
dfa39289a5
fix this when run on non x86 hosts.
...
llvm-svn: 44645
2007-12-06 01:05:52 +00:00
Evan Cheng
7fc1d98353
Fix for PR1831: if all defs of an interval are re-materializable, then it's a preferred spill candiate.
...
llvm-svn: 44644
2007-12-06 00:01:56 +00:00
Evan Cheng
d3d8017bcb
If both result of the {s|z}xt and its source are live out, rewrite all uses of the source with result of extension.
...
llvm-svn: 44643
2007-12-05 23:58:20 +00:00
Ted Kremenek
260d01d6e6
Subdivided the function InitializeBaseLanguage into InitializeBaseLanguage,
...
GetLanguage, and InitializeLangOptions. The goal is to break up this logic
into atomic units of functionality that can later be refactored into better
driver logic that is capable of handling a mixture of source files of
different languages.
llvm-svn: 44642
2007-12-05 23:49:08 +00:00
Chris Lattner
6a04fcb2f4
improve header guard
...
llvm-svn: 44641
2007-12-05 23:45:41 +00:00
Chris Lattner
55d8c3f71b
split the JIT memory management code out from the main JIT logic into its
...
own JITMemoryManager interface. There is no functionality change with
this patch.
llvm-svn: 44640
2007-12-05 23:39:57 +00:00
Chris Lattner
2ed8f31f2f
Avoid passing Diags into InitializeIncludePaths.
...
llvm-svn: 44639
2007-12-05 23:24:17 +00:00
Chris Lattner
5e224c32f4
add a note
...
llvm-svn: 44638
2007-12-05 23:05:06 +00:00
Chris Lattner
ad05e17491
add a note
...
llvm-svn: 44637
2007-12-05 22:58:19 +00:00
Steve Naroff
152dd812b2
Make sure Parser::ParseObjCSelectorExpression() handles unary selectors (with no arguments) properly.
...
llvm-svn: 44636
2007-12-05 22:21:29 +00:00
Ted Kremenek
cdcf6dcbcb
Removed dependence on including iostream (use llvm/Support/Streams.h instead).
...
llvm-svn: 44635
2007-12-05 22:21:13 +00:00
Ted Kremenek
e095881856
Converted SerializationTest (--test-pickling) to use the new TranslationUnit
...
class to serialize and deserialize translation units.
llvm-svn: 44634
2007-12-05 22:08:43 +00:00
Steve Naroff
ff9f8efe4d
Make sure the class methods get attached to the metaclass object.
...
Need to query the implementation, not the interface...
llvm-svn: 44633
2007-12-05 21:49:40 +00:00
Ted Kremenek
68d232b477
Added Driver/TranslationUnit.h and Driver/TranslationUnit.cpp to the
...
XCode project.
llvm-svn: 44632
2007-12-05 21:36:57 +00:00
Ted Kremenek
62f4302ec7
Added "TranslationUnit" class that will be used to provide an interface
...
for serializing/deserializing ASTs that is decoupled from the logic
in SerializationTest (which will soon be rewritten to use this interface).
llvm-svn: 44631
2007-12-05 21:36:08 +00:00
Ted Kremenek
dd1a7aade5
Modified: CreateTargetInfo(). Now takes Diagnostic* instead of Diagnostic&.
...
Modified: ctor of SerializationTest: Now takes LangOptions argument. We
will eventually serialize this as well.
llvm-svn: 44630
2007-12-05 21:34:36 +00:00
Bill Wendling
dc71f08586
Alphabetizing; I want to be the last in the file!!!! ;-)
...
llvm-svn: 44629
2007-12-05 21:26:54 +00:00
Scott Michel
7c56a522af
Regenerated configure after autoconf/configure.ac change.
...
llvm-svn: 44628
2007-12-05 21:24:02 +00:00
Scott Michel
83d54c9ee0
Minor updates:
...
- Fix typo in SPUCallingConv.td
- Credit myself for CellSPU work
- Add CellSPU to 'all' host target list
llvm-svn: 44627
2007-12-05 21:23:16 +00:00
Duncan Sands
abba5e218c
Commit 44487 broke bootstrap of llvm-gcc-4.2. It is
...
not yet clear why, but in the meantime work around the
problem by making less use of readnone/readonly info.
llvm-svn: 44626
2007-12-05 21:03:28 +00:00
Ted Kremenek
2968476c2d
Added Basic/LangOptions.cpp to XCode project.
...
llvm-svn: 44625
2007-12-05 19:07:32 +00:00
Ted Kremenek
ae492c4f0c
Implemented serialization of LangOptions.
...
llvm-svn: 44624
2007-12-05 19:06:15 +00:00
Evan Cheng
3b8a674469
Added canFoldMemoryOperand for PPC.
...
llvm-svn: 44623
2007-12-05 18:41:29 +00:00
Chris Lattner
36021a9cc1
I'm apparently the only sad lonely ppc user left :)
...
llvm-svn: 44622
2007-12-05 18:41:05 +00:00
Evan Cheng
8492bdeaa4
Update foldMemoryOperand.
...
llvm-svn: 44621
2007-12-05 18:36:37 +00:00
Chris Lattner
de9bfcf67a
fix warnings
...
llvm-svn: 44620
2007-12-05 18:32:18 +00:00
Chris Lattner
8292519705
allow this to build
...
llvm-svn: 44619
2007-12-05 18:30:11 +00:00
Ted Kremenek
a4c13bd94b
Moved creation of ASTConsumers that can operate on both freshly-parsed and
...
deserialized ASTs into the function CreateASTConsumer(). This function
is called by ProcessInputFile, and soon the logic that processes deserialized
ASTs.
llvm-svn: 44618
2007-12-05 18:27:04 +00:00
Fariborz Jahanian
b31a2f2a47
Patch to prevent crash on use of objc2 syntax.
...
llvm-svn: 44617
2007-12-05 18:16:33 +00:00
Fariborz Jahanian
d5db92ba97
Changed type-cast of "struct objc_super"'s 2nd initializer to match definition of
...
"struct objc_super".
llvm-svn: 44616
2007-12-05 17:29:46 +00:00
Chris Lattner
6eed001371
fix some bogus code noticed by Kevin Andre
...
llvm-svn: 44615
2007-12-05 17:21:34 +00:00
Neil Booth
06f20ea4ba
Prior commit updated wrong if, apologies.
...
llvm-svn: 44614
2007-12-05 13:06:04 +00:00
Neil Booth
3ab004bca6
Handle zero correctly.
...
llvm-svn: 44613
2007-12-05 13:01:24 +00:00
Evan Cheng
678b86d6ce
MachineInstr can change. Store indexes instead.
...
llvm-svn: 44612
2007-12-05 10:24:35 +00:00
Evan Cheng
06353b48b5
If a split live interval is spilled again, remove the kill marker on its last use.
...
llvm-svn: 44611
2007-12-05 09:51:10 +00:00
Evan Cheng
64b3baaaea
Clobber more bugs.
...
llvm-svn: 44610
2007-12-05 09:05:34 +00:00
Evan Cheng
d7de56ac93
Fix kill info for split intervals.
...
llvm-svn: 44609
2007-12-05 08:16:32 +00:00
Chris Lattner
c9693c60a5
more scalarization
...
llvm-svn: 44608
2007-12-05 07:45:02 +00:00
Chris Lattner
1a0d49a63c
scalarize vector binops
...
llvm-svn: 44607
2007-12-05 07:36:58 +00:00
Anders Carlsson
a297e7a888
Implement CodeGen for vectors. Don't create unnecessary conversion instructions if the value to be converted is a constant.
...
llvm-svn: 44606
2007-12-05 07:36:10 +00:00
Anders Carlsson
2c1ec6d5f7
Add sema checking for compound literal expressions.
...
llvm-svn: 44605
2007-12-05 07:24:19 +00:00
Anders Carlsson
e8ee04c0bc
Implement codegen for builtin infinity functions.
...
llvm-svn: 44604
2007-12-05 07:22:48 +00:00
Anders Carlsson
cbdb6f5b5d
Revert DidWarn change - It won't catch all cases anyway and GCC warns for every excess element. Maybe later we can add back the limit and make it smarter.
...
llvm-svn: 44603
2007-12-05 04:57:06 +00:00
Steve Naroff
2644aaf537
Recognize CompoundLiteralExpr's as valid lvalue's.
...
Also updated a FIXME in Sema::CheckInitializer()...
llvm-svn: 44602
2007-12-05 04:00:10 +00:00
Evan Cheng
269dbd31d0
- Mark last use of a split interval as kill instead of letting spiller track it.
...
This allows an important optimization to be re-enabled.
- If all uses / defs of a split interval can be folded, give the interval a
low spill weight so it would not be picked in case spilling is needed (avoid
pushing other intervals in the same BB to be spilled).
llvm-svn: 44601
2007-12-05 03:22:34 +00:00
Evan Cheng
bb26301864
Add a argument to storeRegToStackSlot and storeRegToAddr to specify whether
...
the stored register is killed.
llvm-svn: 44600
2007-12-05 03:14:33 +00:00
Scott Michel
d766e5d7c2
fixed header attribution
...
llvm-svn: 44599
2007-12-05 02:08:01 +00:00
Scott Michel
4834955fdf
More stuff for CellSPU -- this should be enough to get an error-free
...
compilation (no files missing). Test cases remain to be checked in.
llvm-svn: 44598
2007-12-05 02:01:41 +00:00
Scott Michel
d1b5b9f68c
Updated source file headers to llvm coding standard.
...
llvm-svn: 44597
2007-12-05 01:40:25 +00:00
Scott Michel
8d35728607
Two missing files.
...
llvm-svn: 44596
2007-12-05 01:31:18 +00:00
Scott Michel
eff980208a
Main CellSPU backend files checked in. Intrinsics and autoconf files
...
remain.
llvm-svn: 44595
2007-12-05 01:24:05 +00:00
Dale Johannesen
9d43e3d841
Handle 0 correctly in string->APFloat conversion.
...
llvm-svn: 44594
2007-12-05 01:10:19 +00:00
Ted Kremenek
90a7c12bb4
Implemented serialization of: ObjCEncodeExpr, ObjCSelectorExpr.
...
llvm-svn: 44593
2007-12-05 00:43:08 +00:00
Ted Kremenek
166e505d27
Added serialization support of SourceManager to the clang driver.
...
llvm-svn: 44592
2007-12-05 00:26:13 +00:00
Ted Kremenek
e634142388
Renamed SourceManager::Read to SourceManager::CreateAndRegister.
...
Now sourcemanager deserializer automatically self-registers itself with
the deserializer.
llvm-svn: 44591
2007-12-05 00:19:51 +00:00
Ted Kremenek
57f4c00241
Implemented initial serialization support for SourceManager.
...
llvm-svn: 44590
2007-12-05 00:14:18 +00:00
Ted Kremenek
ca0cb926f4
Added "Emitter" functor to allow easy emitting of elements of a container
...
using std::for_each.
llvm-svn: 44589
2007-12-05 00:13:07 +00:00
Steve Naroff
0317aeb4b6
Add the definition of objc_super...
...
llvm-svn: 44588
2007-12-04 23:59:30 +00:00
Evan Cheng
e412a4427b
Remove a unsafe optimization. This fixes 401.bzip2.
...
llvm-svn: 44587
2007-12-04 23:57:55 +00:00
Devang Patel
e9d786e54d
Add --with-llvmgcc= and --with-llvmgxx= configure options.
...
llvm-svn: 44586
2007-12-04 22:54:47 +00:00
Ted Kremenek
6ca076cb7a
Removed serialization of FileEntry and DirectoryEntry. This objects will
...
now be lazily recreated upon deserialization.
llvm-svn: 44585
2007-12-04 22:42:20 +00:00
Scott Michel
dfe09ed085
More files in the CellSPU drop...
...
llvm-svn: 44584
2007-12-04 22:35:58 +00:00
Fariborz Jahanian
1e34ce1045
Type-cast initializers for "struct objc_super" parameter to avoid warning.
...
llvm-svn: 44583
2007-12-04 22:32:58 +00:00
Scott Michel
6e22c651d1
More of the Cell SPU code drop from "Team Aerospace".
...
llvm-svn: 44582
2007-12-04 22:23:35 +00:00
Fariborz Jahanian
22c278a216
Test case for my last patch.
...
llvm-svn: 44581
2007-12-04 21:48:54 +00:00
Fariborz Jahanian
31e1850694
Don't assert if objc.h not declared when rewriting.
...
llvm-svn: 44580
2007-12-04 21:47:40 +00:00
Ted Kremenek
c638952f59
Implemented serialization of SrcMgr::ContentCache.
...
llvm-svn: 44578
2007-12-04 19:39:02 +00:00
Fariborz Jahanian
f256b48bc7
Removed a "TODO" comment as objc1 runtime does not need to do the "TODO".
...
llvm-svn: 44577
2007-12-04 19:31:56 +00:00
Fariborz Jahanian
1f606a999e
Simplified setting up Method's scope before generating AST for its nody.
...
llvm-svn: 44576
2007-12-04 19:20:11 +00:00
Evan Cheng
cd8a89b3cd
Spiller unfold optimization bug: do not clobber a reusable stack slot value unless it can be modified.
...
llvm-svn: 44575
2007-12-04 19:19:45 +00:00
Ted Kremenek
c6593c2c2e
Fixed a few more comments to change "FileInfo" to "ContentCache."
...
llvm-svn: 44574
2007-12-04 18:59:28 +00:00
Ted Kremenek
f7260b191c
Implemented serialization of FileEntry and DirectoryEntry.
...
llvm-svn: 44573
2007-12-04 18:21:35 +00:00
Ted Kremenek
0c2bea2909
Removed searching for "darwin" keyword in target triple. We don't really support
...
any alternative targets at this point other than "darwin," so we now default to
Darwin targets (for now).
llvm-svn: 44572
2007-12-04 17:07:35 +00:00
Ted Kremenek
bce8b49973
Removed IntrusiveSPtr. There are no clients of this class anymore, so it is
...
not needed, and it was never extensively tested. If we need an intrusive
reference-counting smart pointer, we can always import intrusive_ptr from
boost.
llvm-svn: 44571
2007-12-04 16:54:09 +00:00
Chris Lattner
b892225fb9
Implement framework for scalarizing node results. This is sufficient
...
to codegen this:
define float @test_extract_elt(<1 x float> * %P) {
%p = load <1 x float>* %P
%R = extractelement <1 x float> %p, i32 0
ret float %R
}
llvm-svn: 44570
2007-12-04 07:48:46 +00:00
Chris Lattner
681c9d6697
start providing framework for scalarizing vectors.
...
llvm-svn: 44569
2007-12-04 07:29:51 +00:00
Ted Kremenek
c8f444ff80
Implemented serialization of ObjCStringLiteral.
...
llvm-svn: 44568
2007-12-04 00:51:11 +00:00
Ted Kremenek
b8714c8ef1
Implemented serialization for ObjcAtThrowStmt.
...
llvm-svn: 44567
2007-12-04 00:40:49 +00:00
Ted Kremenek
98b3a71537
Implemented serialization of ObjcAtTryStmt.
...
llvm-svn: 44566
2007-12-04 00:38:30 +00:00
Evan Cheng
d1badb960e
Discard split intervals made empty due to folding.
...
llvm-svn: 44565
2007-12-04 00:32:23 +00:00
Ted Kremenek
ee695a3456
Implemented serialization for ObjcAtFinallyStmt.
...
llvm-svn: 44564
2007-12-04 00:32:22 +00:00
Ted Kremenek
0bf3e33dcc
Implemented serialization for ObjcAtCatchStmt.
...
llvm-svn: 44563
2007-12-04 00:28:54 +00:00
Ted Kremenek
9c26202c76
Fixed order of operands to strstr call.
...
llvm-svn: 44561
2007-12-03 23:25:59 +00:00
Ted Kremenek
eead4052e9
For target processing, on non-Darwin systems instead of using the host triple,
...
we default to "i386-apple-darwin". This is an interim solution.
Removed processing of "linux" triples from Targets.cpp, since we don't have
any sensical Linux target support (yet).
Cleaned up error processing of targets; added better diagnostics.
llvm-svn: 44560
2007-12-03 23:23:21 +00:00
Scott Michel
d821fe741e
More CellSPU files... more to follow.
...
llvm-svn: 44559
2007-12-03 23:14:43 +00:00
Scott Michel
c7bd8d9cb0
Makefile fragment for CellSPU.
...
llvm-svn: 44558
2007-12-03 23:12:49 +00:00
Scott Michel
256e9abbb9
First commit to CellSPU. More to follow
...
llvm-svn: 44557
2007-12-03 23:09:49 +00:00
Fariborz Jahanian
68c06b2d2c
Change <Objc/objc.h> to <objc/objc.h>
...
llvm-svn: 44556
2007-12-03 23:04:29 +00:00
Ted Kremenek
8e3a2a93aa
Implemented serialization of TargetInfo.
...
SerializationTest (subclass of ASTConsumer) now takes Diagnostics& in its ctor.
llvm-svn: 44555
2007-12-03 22:48:14 +00:00
Ted Kremenek
8cdc08ea49
Added some notes on the -triple and -arch options.
...
llvm-svn: 44554
2007-12-03 22:26:16 +00:00
Fariborz Jahanian
d0d2bd5089
Fixed a bug exposed by referencing an ivar field using component reference syntax.
...
llvm-svn: 44553
2007-12-03 22:25:42 +00:00
Ted Kremenek
68fcff9bfa
Few cleanups to patch 44551:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=44551
Removed debugging fprintfs for printing targets.
Implemented error messages when processing invalid targets.
llvm-svn: 44552
2007-12-03 22:11:31 +00:00
Ted Kremenek
b061554caa
Implemented initial support for "-triple" option to the clang driver. This
...
replaces the functionality previously provided by just "-arch" (which is still
supported but has different semantics).
The new behavior is as follows:
(1) If the user does not specify -triple:
(a) If no -arch options are specified, the target triple used is the host
triple (in llvm/Config/config.h).
(b) If one or more -arch's are specified (and no -triple), then there is
one triple for each -arch, where the specified arch is substituted
for the arch in the host triple. Example:
host triple = i686-apple-darwin9
command: clang -arch ppc -arch ppc64 ...
triples used: ppc-apple-darwin9 ppc64-apple-darwin9
(2) The user does specify a -triple (only one allowed):
(a) If no -arch options are specified, the triple specified by -triple
is used. E.g clang -triple i686-apple-darwin9
(b) If one or more -arch options are specified, then the triple specified
by -triple is used as the primary target, and the arch's specified
by -arch are used to create secondary targets. For example:
clang -triple i686-apple-darwin9 -arch ppc -arch ppc64
has the following targets:
i686-apple-darwin9 (primary target)
ppc-apple-darwin9
ppc64-apple-darwin9
Other changes related to the changes to the driver:
- TargetInfoImpl now includes the triple string.
- TargetInfo::getTargetTriple returns the triple for its primary target.
- test case test/Parser/portability.c has been updated because "-arch linux" is
no longer valid ("linux" is an OS, not an arch); instead we use a bogus
architecture "bogusW16W16" where WCharWidth=16 and WCharAlign=16.
llvm-svn: 44551
2007-12-03 22:06:55 +00:00
Chris Lattner
e5a91b4924
Fix an ast-print/ast-dump bug.
...
llvm-svn: 44550
2007-12-03 21:43:25 +00:00
Evan Cheng
40965448ff
Bug fixes.
...
llvm-svn: 44549
2007-12-03 21:31:55 +00:00
Fariborz Jahanian
4f76f22975
Support for rewriteing of messaging of methods which return float.
...
llvm-svn: 44548
2007-12-03 21:26:48 +00:00
Gordon Henriksen
363b02003b
Track dependencies when creating symlinks to LLVM libraries next
...
to the ocaml bindings. This is required on Windows where 'ln -sf'
actually creates a copy. Thanks to Alain Frisch for noticing this.
llvm-svn: 44547
2007-12-03 21:15:53 +00:00
Anton Korobeynikov
3ddfbf36e9
Regenerate
...
llvm-svn: 44546
2007-12-03 21:01:29 +00:00
Anton Korobeynikov
a638f11cd2
Fix fallout from my last patch: don't reject varargs functions :)
...
llvm-svn: 44545
2007-12-03 21:00:45 +00:00
Duncan Sands
38ef3a8ec7
Rather than having special rules like "intrinsics cannot
...
throw exceptions", just mark intrinsics with the nounwind
attribute. Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).
llvm-svn: 44544
2007-12-03 20:06:50 +00:00
Chris Lattner
19970e62e7
update file comment.
...
llvm-svn: 44543
2007-12-03 19:43:18 +00:00
John Criswell
9c9405f4ef
Fixed typo.
...
llvm-svn: 44542
2007-12-03 19:34:25 +00:00
Anton Korobeynikov
c09b265410
Regenerate
...
llvm-svn: 44541
2007-12-03 19:17:47 +00:00
Fariborz Jahanian
9e7b848ac8
Added support for messagings which return a structure-value.
...
(Also fixed a regression caused by recent changes to synthesis of structs).
llvm-svn: 44540
2007-12-03 19:17:29 +00:00
Devang Patel
bd75910fa7
If ExitValue operand is also defined in Loop header then
...
insert new ExitValue after this operand definition.
This fixes PR1828.
llvm-svn: 44539
2007-12-03 19:17:21 +00:00
Anton Korobeynikov
d62b10dc93
More sanity checks for function types.
...
Thanks goes to PyPy folks for generating broken stuff :)
llvm-svn: 44538
2007-12-03 19:16:54 +00:00
Chris Lattner
b39e02bcc2
Describe the notion of 'owners' of the code.
...
llvm-svn: 44537
2007-12-03 19:00:47 +00:00
Ted Kremenek
d85026d925
Added getTrueExpr() and getFalseExpr() to ConditionalOperator. These methods
...
provide handy accessors to the subexpressions of ConditionalOperator that
automatically take into account the GCC extension where the "LHS" expression is
omitted: e.g x ?: y;. When the LHS expression is available, getTrueExpr() is the
same as getLHS(); when LHS is NULL, getTrueExpr() returns the condition expression.
llvm-svn: 44536
2007-12-03 17:09:21 +00:00
Gordon Henriksen
4814cd2271
Applying Anton's binmode fix to the other ofstream too.
...
llvm-svn: 44535
2007-12-03 14:50:37 +00:00
Anton Korobeynikov
bf96d99383
Sorry, typo :)
...
llvm-svn: 44534
2007-12-03 14:35:57 +00:00
Anton Korobeynikov
7c5442b0e3
Open output file correctly. This is extremely important for
...
windows-based hosts, where files are opened in text mode by default.
llvm-svn: 44533
2007-12-03 14:28:26 +00:00
Evan Cheng
196faa9dc5
Typo
...
llvm-svn: 44532
2007-12-03 10:00:00 +00:00
Evan Cheng
85ef9834a6
Update kill info for uses of split intervals.
...
llvm-svn: 44531
2007-12-03 09:58:48 +00:00
Bill Wendling
db4e34984b
Fix for testcase that assigns a dereferenced reference to a pointer. The
...
standard says that we should adjust the "reference to T" type to "T"
before analysis.
llvm-svn: 44530
2007-12-03 07:33:35 +00:00
Seo Sanghyeon
3d072bea09
Ignore typedefs in pointer arithmetic codegen.
...
llvm-svn: 44529
2007-12-03 06:23:43 +00:00
Anton Korobeynikov
9050bd1f68
Provide hook for _alloca to make JITing on Cygwin slightly happier :)
...
llvm-svn: 44528
2007-12-03 05:30:41 +00:00
Nick Lewycky
9746782cea
lli -trace was removed back in 2003.
...
llvm-svn: 44527
2007-12-03 01:58:01 +00:00
Nick Lewycky
d93847a96a
Type::IntTy hasn't existed for a while. Just sub in Type::Int32Ty.
...
llvm-svn: 44526
2007-12-03 01:52:52 +00:00
Anders Carlsson
5dd106b212
Handle initializing vector elements correctly. Emit just one warning if there are excess initializers, instead of one per initializer.
...
llvm-svn: 44525
2007-12-03 01:01:28 +00:00
Chris Lattner
4b6d965611
explain what I need to grant commit access.
...
llvm-svn: 44524
2007-12-03 00:36:20 +00:00
Chris Lattner
6e4f047422
add a fixme
...
llvm-svn: 44523
2007-12-02 23:05:46 +00:00
Chris Lattner
b4ef023bf6
fix typo noticed by Joshua Pennington
...
llvm-svn: 44522
2007-12-02 22:46:01 +00:00
Anders Carlsson
ef93b9d011
Implement __builtin_bswap32 and __builtin_bswap64.
...
llvm-svn: 44521
2007-12-02 21:58:10 +00:00
Chris Lattner
4e4186b2de
fix logic for member expr codegen.
...
llvm-svn: 44520
2007-12-02 18:52:07 +00:00
Seo Sanghyeon
828429fea9
Fix isStructureType and isUnionType to ignore typedefs, as stated
...
in the header. Patch by Cédric Venet.
llvm-svn: 44519
2007-12-02 16:57:27 +00:00
Christopher Lamb
0cbd8723f3
Treat discarding array initializer elements as an extwarn (so -pedantic-errors flags it). Allow CodeGen to truncate the initializer if needed.
...
llvm-svn: 44518
2007-12-02 08:49:54 +00:00
Evan Cheng
f45a1d623c
Remove redundant foldMemoryOperand variants and other code clean up.
...
llvm-svn: 44517
2007-12-02 08:30:39 +00:00
Chris Lattner
310369fb84
restore these lines, which fixes some regtest failures.
...
llvm-svn: 44516
2007-12-02 07:50:03 +00:00
Chris Lattner
6311b58000
all filevar's have static storage. Previously a global with
...
extern storage class was returning false from hasStaticStorage.
Ted, please review this.
llvm-svn: 44515
2007-12-02 07:47:49 +00:00
Christopher Lamb
39aeb4069b
Commit test for CL 44440.
...
llvm-svn: 44514
2007-12-02 07:47:19 +00:00
Chris Lattner
e4f0feb534
Fix buggy test
...
llvm-svn: 44513
2007-12-02 07:46:00 +00:00
Chris Lattner
0475c8178f
globals can't be vla's
...
llvm-svn: 44512
2007-12-02 07:32:25 +00:00
Chris Lattner
d8d18d561e
add codegen support for global inits that require array decay.
...
llvm-svn: 44511
2007-12-02 07:30:13 +00:00
Chris Lattner
d45aa2a03b
warn about unhandled initializers instead of crashing on them.
...
llvm-svn: 44510
2007-12-02 07:19:18 +00:00
Chris Lattner
5bcdf24a50
Handle global variable definitions which change the type of a definition, such as:
...
extern int x[];
void foo() { x[0] = 1; }
int x[10];
void bar() { x[0] = 1; }
llvm-svn: 44509
2007-12-02 07:09:19 +00:00
Chris Lattner
c48023bd5b
remove the alloca insertion point inst, which is an internal helper.
...
llvm-svn: 44508
2007-12-02 06:32:24 +00:00
Chris Lattner
6d27513f6e
merge the llvm global variable when there are multiple C decls.
...
llvm-svn: 44507
2007-12-02 06:30:46 +00:00
Chris Lattner
41af8182d8
implement codegen for functions whose function body type don't match
...
their prototype.
llvm-svn: 44506
2007-12-02 06:27:33 +00:00
Chris Lattner
c5b3aab66b
merge functions with multiple function decls if they have the same name.
...
llvm-svn: 44505
2007-12-02 05:56:05 +00:00
Chris Lattner
e15d0dd63f
Teach clang the prototype for __builtin_alloca.
...
llvm-svn: 44504
2007-12-02 05:42:36 +00:00
Chris Lattner
f0780fae43
convert the rest of the stderr users in codegen to use diagnostics.
...
llvm-svn: 44503
2007-12-02 01:49:16 +00:00
Chris Lattner
fc94434faf
move unsupported warning into a centralized place.
...
llvm-svn: 44502
2007-12-02 01:43:38 +00:00
Chris Lattner
c8dbe1e5d6
Warn about unsupported codegen with the diags machinery, giving us:
...
t.c:3322:5: warning: cannot codegen this yet
__asm__ ("bswap %0" : "+r" (_data));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
instead of:
Unimplemented stmt!
(AsmStmt 0x80eaa0 <t.c:3331:5, line:3334:28>)
llvm-svn: 44501
2007-12-02 01:40:18 +00:00
Chris Lattner
963540dc28
register clz and ctz builtins.
...
llvm-svn: 44500
2007-12-02 01:20:23 +00:00
Chris Lattner
f3a59a1fb8
fix a crash when the rewriter would scan off the beginning of the file.
...
llvm-svn: 44499
2007-12-02 01:13:47 +00:00
Chris Lattner
e6535cfdd2
add support for custom client-specific diagnostics. As a testcase, make the
...
rewriter emit this error if it fails to rewrite an @encode:
t.m:17:9: error: rewriter could not replace sub-expression due to macros
c = ENC(char *)[2] + 4;
^~~~~~~~~~~
... where ENC is: #define ENC @encode
llvm-svn: 44498
2007-12-02 01:09:57 +00:00
Oliver Hunt
a96fe8d5c5
Add support for __builtin_expect which is needed for assert,
...
among other things.
Also change a codegen warning to dump to stderr so it doesn't
mess with -emit-llvm output
llvm-svn: 44497
2007-12-02 01:03:24 +00:00
Chris Lattner
9724ce12f9
improve VC++ compatibility, patch by Cédric Venet.
...
llvm-svn: 44496
2007-12-02 00:47:03 +00:00
Oliver Hunt
aefc8fd415
Support initalisers for more than just int-typed static variables.
...
We now use the CodeGenModule logic for generating the constant
initialiser expression, so happily further initialiser fixes should
automatically work for statics as well.
llvm-svn: 44495
2007-12-02 00:11:25 +00:00
Gordon Henriksen
3e41367dd5
Adding ocamldoc-style comments for the Ocaml bindings.
...
llvm-svn: 44494
2007-12-01 21:01:15 +00:00
Gordon Henriksen
e000c6022f
Fix a typo noticed by Alain Frisch.
...
llvm-svn: 44493
2007-12-01 20:59:23 +00:00
Fariborz Jahanian
9fac54d881
Compute side-effect for conditional expression.
...
llvm-svn: 44492
2007-12-01 19:58:28 +00:00
Chris Lattner
53efb14795
Add #include, patch by Cédric Venet
...
llvm-svn: 44491
2007-12-01 18:59:50 +00:00
Christopher Lamb
7d303b2a20
Better match llvm-gcc's behavior for CodeGen naming of anonymous structs and unions.
...
llvm-svn: 44490
2007-12-01 09:20:34 +00:00
Christopher Lamb
b0e6094a22
When generating the CodeGen type name of a struct, union, enum use the typedef
...
name if a tag type name is not available for the type. This matches how llvm-gcc
chooses CodeGen type names.
This means that "typedef struct {...} foo" now results in a CodeGen name of
"struct.foo" rather than "struct."
llvm-svn: 44489
2007-12-01 09:08:41 +00:00
Seo Sanghyeon
34f92ace1f
Test commit
...
llvm-svn: 44488
2007-12-01 08:06:07 +00:00
Duncan Sands
68b6f50938
Integrate the readonly/readnone logic more deeply
...
into alias analysis. This meant updating the API
which now has versions of the getModRefBehavior,
doesNotAccessMemory and onlyReadsMemory methods
which take a callsite parameter. These should be
used unless the callsite is not known, since in
general they can do a better job than the versions
that take a function. Also, users should no longer
call the version of getModRefBehavior that takes
both a function and a callsite. To reduce the
chance of misuse it is now protected.
llvm-svn: 44487
2007-12-01 07:51:45 +00:00
Chris Lattner
ae7a834e74
make the unused expression warning less noisy by not warning about comma exprs whose
...
LHS and RHS both have side effects.
llvm-svn: 44486
2007-12-01 06:07:34 +00:00
Chris Lattner
e69d662bae
simplify some code, add support for functions without a proto
...
llvm-svn: 44485
2007-12-01 05:58:21 +00:00
Chris Lattner
9e137aad78
fix a couple switch codegen problems Oliver reported.
...
llvm-svn: 44484
2007-12-01 05:27:33 +00:00
Ted Kremenek
3e14c152c6
Fixed bug in the serialization of SelectorTable where we did not register the
...
pointer of MultiKeywordSelectors.
Added optimization to the serialization of SelectorTable where we only serialize
out MultiKeywordSelectors that are ever referenced by an object other than the
SelectorTable.
llvm-svn: 44483
2007-12-01 04:43:17 +00:00
Evan Cheng
388f6f51a0
Fix a bug where splitting cause some unnecessary spilling.
...
llvm-svn: 44482
2007-12-01 04:42:39 +00:00
Owen Anderson
7f09c88977
Fixes for MachineLoopInfo, mostly from Evan. With these, it should be almost useable!
...
llvm-svn: 44480
2007-12-01 03:01:39 +00:00
Evan Cheng
69fda0a716
Allow some reloads to be folded in multi-use cases. Specifically testl r, r -> cmpl [mem], 0.
...
llvm-svn: 44479
2007-12-01 02:07:52 +00:00
Eric Christopher
e62b441b51
Add target triple to include/llvm/Config/config.h.in. Regenerate all files.
...
llvm-svn: 44478
2007-12-01 00:34:39 +00:00
Devang Patel
c7d9af8d6d
Change LinkTimeOptimizer.h install location.
...
llvm-svn: 44477
2007-12-01 00:24:50 +00:00
Devang Patel
0fceaea8be
Change lib lto install location.
...
llvm-svn: 44476
2007-11-30 23:27:57 +00:00
Chris Lattner
4431a1b19b
start partitioning the diagnostics into two classes: those
...
that are builtin and those that are aren't. This is a bunch
of API refactoring that will make this possible, but there is
no functionality change yet.
llvm-svn: 44473
2007-11-30 22:53:43 +00:00
Anders Carlsson
7a9a38abe0
String literals are always valid LValues.
...
llvm-svn: 44472
2007-11-30 22:47:59 +00:00
Ted Kremenek
c9bcda94ae
Implemented serialization of SelectorTable and Selectors.
...
Modified serialization of IdentifierTable to self-register itself with
the Deserializer.
llvm-svn: 44471
2007-11-30 22:46:56 +00:00
Ted Kremenek
8ded669b04
Fixed subtle bug in Deserializer::JumpTo when jumping when the block-nesting
...
information matching did not exactly match the underlying stream's scoping
information.
llvm-svn: 44470
2007-11-30 22:45:05 +00:00
Ted Kremenek
1f80e8b6eb
Fixed potential bug where CurWord is not zeroed out in JumpToBit.
...
llvm-svn: 44469
2007-11-30 22:39:46 +00:00
Chris Lattner
e9c810c87c
pass diagnostics into the rewrite test client.
...
llvm-svn: 44468
2007-11-30 22:25:36 +00:00
Evan Cheng
b10dc27b20
Do not fold reload into an instruction with multiple uses. It issues one extra load.
...
llvm-svn: 44467
2007-11-30 21:23:43 +00:00
Anders Carlsson
3b754452eb
Initialize CurMethodDecl to 0.
...
llvm-svn: 44463
2007-11-30 20:01:38 +00:00
Anders Carlsson
801c5c7467
GCC has an extension where the left hand side of the ? : operator can be omitted. Handle this in a few more places.
...
llvm-svn: 44462
2007-11-30 19:04:31 +00:00
Chris Lattner
907703cecd
chain update requests properly.
...
llvm-svn: 44460
2007-11-30 18:52:58 +00:00
Anders Carlsson
452815a6b2
Initialize LaxVectorConversions.
...
llvm-svn: 44459
2007-11-30 18:29:41 +00:00
Duncan Sands
d4d7f9d69e
Small optimization of parameter attribute lookup.
...
llvm-svn: 44458
2007-11-30 18:20:58 +00:00
Duncan Sands
b41f872013
Add a convenience method for modifying parameter
...
attributes. While there, I noticed that not all
attribute methods returned a pointer-to-constant,
so I fixed that.
llvm-svn: 44457
2007-11-30 18:19:18 +00:00
Chris Lattner
1386de8757
fix a bug handling typedefs in member expr codegen. Patch
...
by Seo Sanghyeon
llvm-svn: 44455
2007-11-30 18:02:19 +00:00
Chris Lattner
b6a7b582ee
Fix a codegen crash on void ?: reported by Oliver
...
llvm-svn: 44454
2007-11-30 17:56:23 +00:00
Chris Lattner
aa0b570dfb
Support fully general case expressions, patch by Sanghyeon Seo!
...
llvm-svn: 44453
2007-11-30 17:44:57 +00:00
Duncan Sands
4e8c071612
Check that there are not more attributes than
...
function parameters.
llvm-svn: 44452
2007-11-30 15:52:20 +00:00
Christopher Lamb
0112f62bb9
Doh! Check in this long overdue test fix.
...
llvm-svn: 44450
2007-11-30 06:35:48 +00:00
Anders Carlsson
e1af1d20ef
Support lax vector conversions.
...
llvm-svn: 44449
2007-11-30 04:21:22 +00:00
Devang Patel
cc45c338d1
Provide a way to update DescGlobals cache directly.
...
llvm-svn: 44446
2007-11-30 00:51:33 +00:00
Steve Naroff
205ec3d07a
Yesterday, I simplified how we stream top-level decls.
...
After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-).
TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately...
llvm-svn: 44445
2007-11-29 23:05:20 +00:00
Ted Kremenek
bfcf8cdbd7
Added method "HandleTopLevelDeclaration" to ASTConsumer. This will eventually
...
be the new hook that ASTStreamer calls to feed top-level Decls to
ASTConsumers.
The difference between "HandleTopLevelDeclaration" and "HandleTopLevelDecl" is
that "HandleTopLevelDecl" is currently called by ASTStreamer for every
top-level declaration, including those that appear within a Decl chain. Using
the new interface, ASTStreamer would only call HandleTopLevelDeclaration for
Decls that appear that the beginning of a Decl chain (i.e., a group of related
decls).
To preserve the behavior that all subclasses of ASTConsumer currently expect,
the default implementation of HandleTopLevelDeclaration simply calls
HandleTopLevelDecl, and for decl chains it calls HandleTopLevelDecl for each
Decl* in a chain of Decls.
The advantage of this interface is that some subclasses of ASTConsumer only
really want the Decl chain, and not each individual Decl passed to them. This
extra level of indirection allows subclasses to override the default behavior
if they so desire.
llvm-svn: 44444
2007-11-29 23:05:17 +00:00
Evan Cheng
d35b5acae4
Do not lose rematerialization info when spilling already split live intervals.
...
llvm-svn: 44443
2007-11-29 23:02:50 +00:00
Christopher Lamb
2ed9afd777
Update the initializer's type, in addition to the decl, if we've changed the type of the decl based on it.
...
llvm-svn: 44440
2007-11-29 19:09:19 +00:00
Ted Kremenek
22a0d616f6
Added "complex.c" (a copy of test/Codegen/complex.) to the serialization
...
test suite.
llvm-svn: 44439
2007-11-29 19:05:51 +00:00
Ted Kremenek
870600d625
Only serialize top-level decls that appear at the head of a decl chain.
...
llvm-svn: 44438
2007-11-29 19:04:54 +00:00
Owen Anderson
ffa55112e0
Fix a miscompilation in spiff on PPC.
...
llvm-svn: 44437
2007-11-29 18:02:22 +00:00
Evan Cheng
8494ee175c
Fix a major performance issue with splitting. If there is a def (not def/use)
...
in the middle of a split basic block, create a new live interval starting at
the def. This avoid artifically extending the live interval over a number of
cycles where it is dead. e.g.
bb1:
= vr1204 (use / kill) <= new interval starts and ends here.
...
...
vr1204 = (new def) <= start a new interval here.
= vr1204 (use)
llvm-svn: 44436
2007-11-29 10:12:14 +00:00
Evan Cheng
37ed3e6320
Update tests.
...
llvm-svn: 44435
2007-11-29 10:03:54 +00:00
Evan Cheng
f85c063ec0
Replace the odd kill# hack with something less fragile.
...
llvm-svn: 44434
2007-11-29 09:49:23 +00:00
Duncan Sands
8dfcd5975e
Small parameter attributes cleanup.
...
llvm-svn: 44433
2007-11-29 08:30:15 +00:00
Chris Lattner
f5a095359e
Pass the whole StringMapEntry into StringMapEntryInitializer::Initialize.
...
llvm-svn: 44432
2007-11-29 06:14:41 +00:00
Christopher Lamb
42e69f219d
Support floating point literals of the form "1e-16f" which specify an exponent but no decimal point.
...
llvm-svn: 44431
2007-11-29 06:06:27 +00:00
Chris Lattner
d1f0e3d791
provide an optional API to allow datatypes in a stringmap to be *gasp*
...
initialized with a value if they want, by specializing the
StringMapEntryInitializer class.
llvm-svn: 44430
2007-11-29 06:04:41 +00:00
Ted Kremenek
1150e25901
Enhanced serialization testing by also pretty-printing CFGs constructed from ASTs
...
both before and after serialization/deserialization. If the CFGs between the pre-
and post- serialized/deserialized ASTs differ, the serialization has failed.
llvm-svn: 44429
2007-11-29 01:24:25 +00:00
Evan Cheng
be255b0650
Fixed various live interval splitting bugs / compile time issues.
...
llvm-svn: 44428
2007-11-29 01:06:25 +00:00
Evan Cheng
147f7799c5
Kill info update bug.
...
llvm-svn: 44427
2007-11-29 01:05:47 +00:00
Ted Kremenek
2501c8294f
Fixed test case to not expect a warning when one should not be emitted.
...
Removed redundant test case.
llvm-svn: 44426
2007-11-29 01:03:21 +00:00
Ted Kremenek
0865d8a5d0
Added test cases for -Wfloat-equal to test comparisons against literals that can be
...
represented exactly and inexactly by APFloats. For the former, we do not emit a
warning.
llvm-svn: 44425
2007-11-29 01:00:11 +00:00
Ted Kremenek
eda40e273e
Enhanced implementation of -Wfloat-equal to check for comparisons against
...
floating-point literals that are represented exactly by the APFloat in
FloatingLiteral. For such literals, we do not emit a warning since such checks are
often performed in real code to see if a variable has changed from its original
value. This heuristic clearly can lead to false negatives, but the hope is it will
significantly reduce false positives to help make the compiler flag more useful.
llvm-svn: 44424
2007-11-29 00:59:04 +00:00
Ted Kremenek
3a2c950401
Added "isExact" field to FloatingLiteral. This flag indicates whether or not
...
the APFloat representing the parsed literal can represent the literal value
exactly. This is useful when performing various semantic checks on the code,
and issuing appropriate warnings to users.
llvm-svn: 44423
2007-11-29 00:56:49 +00:00
Ted Kremenek
9924ca2e14
Removed potential buffer overrun (spotted by Neil Booth) when NumericLiteralParser
...
converts a parsed literal into an APFloat. We are still performing a copy of the
string, which hopefully will be removed eventually for performance reasons. This
version now is at least safe.
Changed rounding in APFloat construction in NumericLiteralParser from rmTowardsZero
to rmNearestTiesToEven.
llvm-svn: 44422
2007-11-29 00:54:29 +00:00
Steve Naroff
197616c3a8
Several fixes/simplifications surrounding how we stream top-level decl AST's.
...
The following code...
typedef struct cssm_data {} CSSM_DATA, *CSSM_DATA_PTR;
struct Y { int A; };
struct X { int A; } D;
struct X E, F;
...now produces the following output...
> ../../Debug/bin/clang xx.c -ast-print
Read top-level tag decl: 'cssm_data'
typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data *CSSM_DATA_PTR;
Read top-level tag decl: 'Y'
Read top-level tag decl: 'X'
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'F'
...which is much more accurate than the previous -ast-print output...
typedef struct cssm_data CSSM_DATA;
typedef struct cssm_data CSSM_DATA;
Read top-level variable decl: 'D'
Read top-level variable decl: 'E'
Read top-level variable decl: 'E'
llvm-svn: 44421
2007-11-28 22:54:11 +00:00
Chris Lattner
cee633a873
New testcase for PR1744
...
llvm-svn: 44418
2007-11-28 22:43:34 +00:00
Ted Kremenek
5933768bec
Converted AST Pretty-Printer to use iostreams instead of FILE*. This fixes
...
a bug where the statement pretty-printer used iostreams but the AST printer
did not. This was an issue when dumping ASTs to something other than stderr.
Updated SerializationTest to use the new iostreams interface for the AST printer.
llvm-svn: 44417
2007-11-28 21:32:21 +00:00
Ted Kremenek
5d169cf285
Inlined test case to make it independent of the stmt_exprs test case in test/Sema.
...
llvm-svn: 44416
2007-11-28 21:29:54 +00:00
Chris Lattner
246b7b2dbf
Work around a GCC bug, producing this code:
...
unsigned char *llvm_cbe_X;
...
llvm_cbe_X = 0; *((void**)&llvm_cbe_X) = __builtin_stack_save();
instead of:
llvm_cbe_X = __builtin_stack_save();
See PR1809 for details.
llvm-svn: 44415
2007-11-28 21:26:17 +00:00
Chris Lattner
3fbb6a83a8
Add a note
...
llvm-svn: 44414
2007-11-28 19:26:42 +00:00
Ted Kremenek
31540ed8fe
Added the "Serialization" test directory to the set of tests executed.
...
Introduced a few line breaks to make the Makefile easier to read.
llvm-svn: 44413
2007-11-28 19:24:15 +00:00
Ted Kremenek
46cfdb9625
Added initial test case for testing serialization of ASTs. This test
...
case simply performs --test-pickling on the code found in Sema/stmt_exprs.c.
llvm-svn: 44412
2007-11-28 19:23:15 +00:00
Ted Kremenek
ac76a41717
Modified --test-pickling to perform an actual cross-check of serialized ASTs:
...
(1) Parsed ASTs are pretty-printed to a text file.
(2) The ASTs are serialized to disk.
(3) The ASTs are deserialized from disk.
(4) The deserialized ASTs are pretty-printed to a text file.
(5) The two pretty-printed files are compared. If they are different, the test
fails.
llvm-svn: 44411
2007-11-28 19:21:47 +00:00
Ted Kremenek
44d5166cdb
Changed TestRunner.sh to dump the output and generated script files in
...
subdirectories mirroring where the test case file is located
For example, for the test case "Sema/stmt_exprs.c", instead of the files
"Output/stmt_exprs.c.out" and "Output/stmt_exprs.c.out.script" being created, the
files "Output/Sema/stmt_exprs.c.out" and "Output/Sema/stmt_exprs.c.out.script" are
created. This prevents any collisions from different test directories that have the
same file name for a test case, and also makes it clear where the test case was
drawn from.
llvm-svn: 44410
2007-11-28 19:16:54 +00:00
Ted Kremenek
ab18e6d7fd
Added missing "RUN:" to comment for test case file. This fixed a bug where the test
...
case testing the frontend's support of statement expressions was not being
executed.
llvm-svn: 44409
2007-11-28 19:05:11 +00:00
Chris Lattner
db2a6ef881
Fix a bug checking for 'int foo(void)' that didn't look through typedefs of void.
...
Bug pointed out by Michael Zolda, thanks!
llvm-svn: 44408
2007-11-28 18:51:29 +00:00
Chris Lattner
57ee7c6630
Implement ExpandOperationResult for ppc i64 fp->int, which fixes
...
CodeGen/Generic/fp_to_int.ll among others. Its unclear why this
just started failing...
llvm-svn: 44407
2007-11-28 18:44:47 +00:00
Chris Lattner
749478a61b
for consistency, allow a fallthrough if the final check returns null.
...
llvm-svn: 44406
2007-11-28 18:30:18 +00:00
Chris Lattner
f4769da4b3
upgrade this test
...
llvm-svn: 44405
2007-11-28 18:22:12 +00:00
Chris Lattner
d6109cf328
make this test have a deterministic result.
...
llvm-svn: 44404
2007-11-28 18:20:49 +00:00
Duncan Sands
5208d1ab4a
Add some convenience methods for querying attributes, and
...
use them.
llvm-svn: 44403
2007-11-28 17:07:01 +00:00
Duncan Sands
b5452fb829
Revert previous "fix" - the breakage was due to some
...
local changes, not the "not".
llvm-svn: 44402
2007-11-28 16:50:29 +00:00
Duncan Sands
0497916c88
This test somehow got an extra "not" during the
...
recent stderr updates.
llvm-svn: 44401
2007-11-28 15:36:27 +00:00
Duncan Sands
ff306287ff
My compiler complains that "x always evaluates to true"
...
in this call:
Result.IntVal = APInt(80, 2, x);
What is x?
uint16_t x[8];
I deduce that the APInt constructor being used is this one:
APInt(uint32_t numBits, uint64_t val, bool isSigned = false);
rather than this one:
APInt(uint32_t numBits, uint32_t numWords, const uint64_t bigVal[]);
That doesn't seem right! This fix compiles but is otherwise completely
untested.
llvm-svn: 44400
2007-11-28 10:36:19 +00:00
Duncan Sands
45a0c3265f
Add missing newlines at EOF.
...
llvm-svn: 44399
2007-11-28 10:13:38 +00:00
Oliver Hunt
93c4ce650c
Fix typo in writable string test
...
llvm-svn: 44398
2007-11-28 06:52:03 +00:00
Oliver Hunt
a951571941
Adding code gen tests for writable and shared string literals.
...
llvm-svn: 44397
2007-11-28 06:27:12 +00:00
Anders Carlsson
0e136ec1d3
Add correct types for the last remaining intrinsics.
...
llvm-svn: 44396
2007-11-28 06:09:44 +00:00
Chris Lattner
e499816a23
xfail a test
...
llvm-svn: 44395
2007-11-28 05:37:13 +00:00
Chris Lattner
fb30009465
Implement support for -fwritable-strings and make the code generator
...
merge string literals when it is not provided.
llvm-svn: 44394
2007-11-28 05:34:05 +00:00
Chris Lattner
e04dc1fa4d
update this test after the fmrrd fix
...
llvm-svn: 44393
2007-11-28 05:27:07 +00:00
Anders Carlsson
299f2fc648
Add more intrinsics. We can now correctly parse both Carbon.h and Cocoa.h without having to do -arch ppc.
...
llvm-svn: 44392
2007-11-28 05:19:59 +00:00
Tanya Lattner
ec072113f0
Fix typo
...
llvm-svn: 44391
2007-11-28 05:14:49 +00:00
Tanya Lattner
8460374e30
Modified instructions to configure llvm-test by configure llvm with the Path --with-llvmgccdir set.
...
llvm-svn: 44390
2007-11-28 05:13:45 +00:00
Tanya Lattner
8f342f8ef3
Fix bug in regression tests that ignored stderr output in RUN lines. Updated tests and fixed broken run lines.
...
XFAILed 3 arm regressions (will file bugs)
llvm-svn: 44389
2007-11-28 04:57:00 +00:00
Chris Lattner
d0d8d4e3b9
fix compilation error noticed by Nuno Lopes
...
llvm-svn: 44388
2007-11-28 04:30:09 +00:00
Evan Cheng
c1648b6a0d
Recover compile time regression.
...
llvm-svn: 44386
2007-11-28 01:28:46 +00:00
Owen Anderson
30767b15e9
Add MachineLoopInfo. This is not yet tested.
...
llvm-svn: 44384
2007-11-27 22:47:08 +00:00
Chris Lattner
f247e27666
commit testcase I forgot to svn add.
...
llvm-svn: 44383
2007-11-27 22:43:37 +00:00
Chris Lattner
57662f3882
several entries got significantly better, though they still aren't done.
...
llvm-svn: 44382
2007-11-27 22:41:52 +00:00
Chris Lattner
f3f4ad9dd6
implement a trivial readme entry.
...
llvm-svn: 44380
2007-11-27 22:36:16 +00:00
Chris Lattner
79ae9895f6
Fix a crash on invalid code due to memcpy lowering.
...
llvm-svn: 44378
2007-11-27 22:14:42 +00:00
Ted Kremenek
7c81bdd4e7
Migrated static functions that print decls into a DeclPrinter class,
...
which is now used (or subclasssed) by the ASTConsumers. This new class
stores a FILE* that is used for writing, instead of just hardwiring output
to stderr (it defaults to stderr if no FILE* is provided).
Modified CreateASTPrinter() to accept a FILE* for printing.
llvm-svn: 44377
2007-11-27 21:46:50 +00:00
Chris Lattner
da22eeca44
add several cases that Expr::hasStaticStorage missed, pointed out by Oliver Hunt
...
llvm-svn: 44376
2007-11-27 21:35:27 +00:00
Chris Lattner
1a6bb70ad0
Set loc earlier in CheckSingleInitializer to avoid emitting a
...
diagnostic without a location. This produces:
simpleTest.c:2:18: error: initializer element is not constant
int *myPointer = &(myArray[2]);
^~~~~~~~~~~~~
instead of:
error: initializer element is not constant
llvm-svn: 44375
2007-11-27 21:21:35 +00:00
Chris Lattner
be5f3cb6f1
Make this actually work on systems that support ppc long double.
...
llvm-svn: 44374
2007-11-27 20:45:25 +00:00
Chris Lattner
fffd0ae2f1
Unbreak all of the darwin/ppc32 JIT failures having to do
...
with not being able to find printf.
llvm-svn: 44373
2007-11-27 20:41:32 +00:00
Ted Kremenek
14d5f741ab
Updated GenLibDeps.pl to employ "use strict" to help prevent uses of variables
...
that have not yet been defined.
Removed used of grep and sed when parsing the results of "nm". This was
originally motivated because if the user has specified options to grep using
the environment variable GREP_OPTIONS this could break the script. Piping
through grep/sed/sort/uniq is also (to my understanding) not necessary, and
the equivalent operations can be done much faster in the Perl script.
Using a crude benchmark, these changes resulted in a 3x speedup in the
execution of GenLibDeps.pl.
llvm-svn: 44372
2007-11-27 19:31:11 +00:00
Nate Begeman
6f026a654c
Support returning non-power-of-2 vectors to unblock some work
...
llvm-svn: 44371
2007-11-27 19:28:48 +00:00
Andrew Lenharth
b960acebde
something wrong with this opt
...
llvm-svn: 44370
2007-11-27 18:31:30 +00:00
Chris Lattner
a7944d86de
sizeof is defined by bitsin(char) not by units of 8 bits.
...
llvm-svn: 44369
2007-11-27 18:22:04 +00:00
Anton Korobeynikov
75445ae2c3
Add testcase for last llvm-gcc tweaks
...
llvm-svn: 44368
2007-11-27 18:21:29 +00:00
Chris Lattner
1cfe02c38b
update to match change in mainline llvm.
...
llvm-svn: 44367
2007-11-27 18:20:52 +00:00
Steve Naroff
0ee0b0ab8c
Move the null pointer constant check from Sema::CheckSingleInitializer/ActOnCallExpr/CheckMessageArgumentTypes/ActOnReturnStmt to Sema::CheckSingleAssignmentConstraints. This makes sure all null pointer assignments are considered compatible.
...
Thanks to Seo Sanghyeon for the bug, follow-through, and patch!
llvm-svn: 44366
2007-11-27 17:58:44 +00:00
Ted Kremenek
c6298de211
Added quotes around $(NM_PATH) argument to GenLibDeps.pl script so that
...
the "-p" option is actually seen by nm (it was being dropped as it was
considered as separate argument to the Perl script).
llvm-svn: 44365
2007-11-27 17:53:54 +00:00
Chris Lattner
1dfc48d4f6
Unbreak backwards compatibility with bytecode format. Regression
...
introduced by this patch:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071126/055824.html
llvm-svn: 44364
2007-11-27 17:48:06 +00:00
Duncan Sands
ad0ea2d430
Fix PR1146: parameter attributes are longer part of
...
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.
llvm-svn: 44359
2007-11-27 13:23:08 +00:00
Chris Lattner
db3467f8d4
handle __vector_size__ like vector_size
...
llvm-svn: 44358
2007-11-27 07:28:18 +00:00
Anders Carlsson
61d6f8d6c3
Add builtin type signature support for vector types. Add correct type signatures for a bunch of MMX builtins. We now parse all the intrinsics in mmintrin.h
...
llvm-svn: 44357
2007-11-27 07:22:09 +00:00
Anders Carlsson
24c59958f4
Add comment to CheckVectorCast.h
...
llvm-svn: 44356
2007-11-27 07:16:40 +00:00
Chris Lattner
f04b69b26c
take an initial stab at setting function linkage right. Handle
...
static and inline at least.
llvm-svn: 44355
2007-11-27 06:46:51 +00:00
Zhou Sheng
34ffaeeeed
Make this pass for CYGWIN.
...
llvm-svn: 44354
2007-11-27 06:23:59 +00:00
Zhou Sheng
73286d6309
Make this testcase compatible with CYGWIN.
...
llvm-svn: 44353
2007-11-27 06:17:01 +00:00
Chris Lattner
698b1cb28d
err, no really.
...
llvm-svn: 44352
2007-11-27 06:14:32 +00:00
Chris Lattner
28caf2717a
don't depend on ADL.
...
llvm-svn: 44351
2007-11-27 06:14:12 +00:00
Anders Carlsson
de71adff60
Report errors for invalid casts from/to vectors.
...
llvm-svn: 44350
2007-11-27 05:51:55 +00:00
Anders Carlsson
f511f646a4
Add more semantic analysis for inline asm statements.
...
llvm-svn: 44349
2007-11-27 04:11:28 +00:00
Owen Anderson
b0dd27ee91
Make LoopInfoBase more generic, in preparation for having MachineLoopInfo. This involves a small interface change.
...
llvm-svn: 44348
2007-11-27 03:43:35 +00:00
Owen Anderson
5aad0d7ea2
Add accessor for getting the underlying templated type. This is necessary for templated LoopInfo.
...
llvm-svn: 44347
2007-11-27 03:33:40 +00:00
Chuck Rose III
20a104c87f
Moving TGLexer.h from source to header file tab in TableGen project file
...
llvm-svn: 44346
2007-11-27 01:25:12 +00:00
Dan Gohman
8bba724afc
Change &| to |&.
...
llvm-svn: 44345
2007-11-27 00:50:57 +00:00
Dan Gohman
2dba0788a5
Change grep '' to grep {}.
...
Change 2>&1 | to |&.
llvm-svn: 44344
2007-11-27 00:10:35 +00:00
Dan Gohman
9ab9e9fa03
Don't redirect llvm-as's stderr to llvm-dis.
...
Change grep '' to grep {}.
llvm-svn: 44343
2007-11-27 00:07:33 +00:00
Dan Gohman
f151c8e760
Remove unnecessary && from the RUN lines of this test.
...
llvm-svn: 44342
2007-11-27 00:03:38 +00:00
Dan Gohman
9a69341725
Don't lower srem/urem X%C to X-X/C*C unless the division is actually
...
optimized. This avoids creating illegal divisions when the combiner is
running after legalize; this fixes PR1815. Also, it produces better
code in the included testcase by avoiding the subtract and multiply
when the division isn't optimized.
llvm-svn: 44341
2007-11-26 23:46:11 +00:00
Chuck Rose III
084b0eb3ca
Add TGParser files to VStudio project files. Removed generated files section from TableGen project file as it is no longer needed. #Include <algorithm> directly from TGParser.cpp so it can see std::reverse.
...
llvm-svn: 44340
2007-11-26 23:19:59 +00:00
Ted Kremenek
fbb08bc2e2
Added optional pass-by-reference argument "isExact" to
...
NumericLiteralParser::GetFloatValue(). Upon method return, this flag has the value
true if the returned APFloat can exactly represent the number in the parsed text,
and false otherwise.
Modified the implementation of GetFloatValue() to parse literals using APFloat's
convertFromString method (which allows us to set the value of isExact).
llvm-svn: 44339
2007-11-26 23:12:30 +00:00
Ted Kremenek
871422eca9
Removed dependence on #including iostream.
...
llvm-svn: 44338
2007-11-26 22:50:46 +00:00
Ted Kremenek
6eefb85ef5
Fixed #include of objc/objc.h so that it works on case-sensitive filesystems.
...
llvm-svn: 44337
2007-11-26 22:49:09 +00:00
Ted Kremenek
2b0ce11952
Reverted changed to getTagDeclType() introduced in patch 44089:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=44089
"Decl" once again can no longer be NULL, so the NULL checks are not needed.
llvm-svn: 44336
2007-11-26 21:16:01 +00:00
Fariborz Jahanian
96502afb6f
Fixed a rewrite bug in class synthesis (which I first thought was a rewrite API bug).
...
llvm-svn: 44335
2007-11-26 20:59:57 +00:00
Kevin
e01743a3a3
Removes link to status page till the info gets added. Someone put us on Reddit; Don't want it to look bad on the project. :)
...
http://programming.reddit.com/info/61f8g/comments/
llvm-svn: 44334
2007-11-26 20:47:14 +00:00
Fariborz Jahanian
a883d6ed89
Patch to fix a regression caused by recent rewrite changes.
...
A potential API bug in ReplaceText pending (A FIXME is added).
llvm-svn: 44333
2007-11-26 19:52:57 +00:00
Ted Kremenek
ebb1c0ca74
Fixed StmtPrinter to handle GCC extension to the ternary operator "?:" where
...
the LHS subexpression can be NULL. Patch provided by Nuno Lopes!
llvm-svn: 44328
2007-11-26 18:27:54 +00:00
Ted Kremenek
138988765c
Fixed bug in CFG construction where we did not properly handle the GCC
...
extension "?:" for the ternary operator, e.g.: x ?: y; This expression is
represented in the clang ASTs as a ConditionalOperator whose LHS expression is
NULL. Now we handle this special case, causing the block containing the
condition to be a predecessor to the block that "merges" the values of the
ternary operator.
Thanks to Nuno Lopes for identifying and diagnosing this bug!
llvm-svn: 44327
2007-11-26 18:20:26 +00:00
Bill Wendling
8da1db4f34
The checking for the delimiters of expected error/warning messages was
...
looking only for { and } instead of {{ and }}. Changed it to check for
this explicitly.
llvm-svn: 44326
2007-11-26 08:26:20 +00:00
Owen Anderson
9f0b6e9d46
Fix another bug that was causing siod to fail.
...
llvm-svn: 44325
2007-11-26 07:17:19 +00:00
Owen Anderson
7cad745d49
Fix a silly bug that Nicholas noticed.
...
llvm-svn: 44324
2007-11-26 03:27:38 +00:00
Owen Anderson
4f833c7610
Allow GVN to eliminate read-only function calls when it can detect that they are redundant.
...
llvm-svn: 44323
2007-11-26 02:26:36 +00:00
Chris Lattner
2ab40a6207
Fix sema support for the gnu ?: expression with a
...
missing middle expression, and fix a codegen bug where
we didn't correctly promote the condition to the right
result type. This fixes PR1824.
llvm-svn: 44322
2007-11-26 01:40:58 +00:00
Chris Lattner
a3ee6fa84f
this works.
...
llvm-svn: 44321
2007-11-26 01:39:17 +00:00
Anton Korobeynikov
2f76e373ae
Remove another leak. Due to some reason AliasSetTracker didn't had any dtor...
...
llvm-svn: 44320
2007-11-25 23:52:02 +00:00
Nick Lewycky
cdb7e54ca7
Add new SCEV, SCEVSMax. This allows LLVM to analyze do-while loops.
...
llvm-svn: 44319
2007-11-25 22:41:31 +00:00
Chris Lattner
c00e8adfe0
Implement PR1822
...
llvm-svn: 44318
2007-11-25 21:27:53 +00:00
Anton Korobeynikov
bd9df0f200
Remove a leak. Destroy LoopInfoBase object. releaseMemory() is actually called in its dtor.
...
llvm-svn: 44317
2007-11-25 18:41:39 +00:00
Chris Lattner
852ed06d60
sizeof() return size in bytes, not bits, patch by Nuno Lopes!
...
llvm-svn: 44316
2007-11-25 17:48:21 +00:00
Duncan Sands
185eeac0f8
Fix PR1816. If a bitcast of a function only exists because of a
...
trivial difference in function attributes, allow calls to it to
be converted to direct calls. Based on a patch by Török Edwin.
While there, move the various lists of mutually incompatible
parameters etc out of the verifier and into ParameterAttributes.h.
llvm-svn: 44315
2007-11-25 14:10:56 +00:00
Reid Spencer
f7121af96d
Don't ignore files that are no longer in use.
...
llvm-svn: 44313
2007-11-25 07:05:05 +00:00
Ted Kremenek
43fb8b0799
Moved logic for -Wfloat-equal to SemaChecking.cpp.
...
Moved utility functions IgnoreParen and friends to be static inline functions
defined in SemaUtil.h.
Added SemaUtil.h to Xcode project.
llvm-svn: 44312
2007-11-25 00:58:00 +00:00
Anders Carlsson
290aa8560b
Check that the clobber registers are valid.
...
llvm-svn: 44311
2007-11-25 00:25:21 +00:00
Chris Lattner
5728bdd4db
Fix a long standing deficiency in the X86 backend: we would
...
sometimes emit "zero" and "all one" vectors multiple times,
for example:
_test2:
pcmpeqd %mm0, %mm0
movq %mm0, _M1
pcmpeqd %mm0, %mm0
movq %mm0, _M2
ret
instead of:
_test2:
pcmpeqd %mm0, %mm0
movq %mm0, _M1
movq %mm0, _M2
ret
This patch fixes this by always arranging for zero/one vectors
to be defined as v4i32 or v2i32 (SSE/MMX) instead of letting them be
any random type. This ensures they get trivially CSE'd on the dag.
This fix is also important for LegalizeDAGTypes, as it gets unhappy
when the x86 backend wants BUILD_VECTOR(i64 0) to be legal even when
'i64' isn't legal.
This patch makes the following changes:
1) X86TargetLowering::LowerBUILD_VECTOR now lowers 0/1 vectors into
their canonical types.
2) The now-dead patterns are removed from the SSE/MMX .td files.
3) All the patterns in the .td file that referred to immAllOnesV or
immAllZerosV in the wrong form now use *_bc to match them with a
bitcast wrapped around them.
4) X86DAGToDAGISel::SelectScalarSSELoad is generalized to handle
bitcast'd zero vectors, which simplifies the code actually.
5) getShuffleVectorZeroOrUndef is updated to generate a shuffle that
is legal, instead of generating one that is illegal and expecting
a later legalize pass to clean it up.
6) isZeroShuffle is generalized to handle bitcast of zeros.
7) several other minor tweaks.
This patch is definite goodness, but has the potential to cause random
code quality regressions. Please be on the lookout for these and let
me know if they happen.
llvm-svn: 44310
2007-11-25 00:24:49 +00:00
Anders Carlsson
c163657f2f
Forgot some X86 registers
...
llvm-svn: 44309
2007-11-25 00:23:10 +00:00
Anders Carlsson
5fa3f348f7
Add tables for GCC register names and aliases. This will be used for inline asm
...
llvm-svn: 44308
2007-11-24 23:38:12 +00:00
Ted Kremenek
0d20033c6a
Added more test cases for uninitialized values checker.
...
llvm-svn: 44307
2007-11-24 23:06:58 +00:00
Ted Kremenek
2e04d73d83
Fixed bogus culling of uninitialized-values "taint" propagation during assignments.
...
We accidentally were throttling the propagation of uninitialized state across
assignments (e.g. x = y). Thanks to Anders Carlsson for spotting this problem.
Added test cases to test suite to provide regression testing for the
uninitialized values analysis.
llvm-svn: 44306
2007-11-24 20:07:36 +00:00
Ted Kremenek
33407b3338
Moved dead-stores test cast to a new test suite subdirectory: Analysis.
...
llvm-svn: 44305
2007-11-24 19:49:35 +00:00
Chris Lattner
cab915f9cf
Implement expand support for MERGE_VALUEs that only produces one result.
...
llvm-svn: 44304
2007-11-24 19:12:15 +00:00
Chris Lattner
6a49593aa5
add a immAllZerosV_bc pattern fragment for consistency with others.
...
llvm-svn: 44303
2007-11-24 19:02:07 +00:00
Chris Lattner
f72ad16263
remove bogus assertion that broke CodeGen/Generic/cast-fp.ll on x86
...
among others.
llvm-svn: 44302
2007-11-24 18:37:20 +00:00
Chris Lattner
6e3641897b
Implement support for custom legalization in DAGTypeLegalizer::ExpandOperand.
...
Improve a comment.
Unbreak Duncan's carefully written path compression where I didn't realize
what was happening!
llvm-svn: 44301
2007-11-24 18:11:42 +00:00
Chris Lattner
f81d5886c6
Several changes:
...
1) Change the interface to TargetLowering::ExpandOperationResult to
take and return entire NODES that need a result expanded, not just
the value. This allows us to handle things like READCYCLECOUNTER,
which returns two values.
2) Implement (extremely limited) support in LegalizeDAG::ExpandOp for MERGE_VALUES.
3) Reimplement custom lowering in LegalizeDAGTypes in terms of the new
ExpandOperationResult. This makes the result simpler and fully
general.
4) Implement (fully general) expand support for MERGE_VALUES in LegalizeDAGTypes.
5) Implement ExpandOperationResult support for ARM f64->i64 bitconvert and ARM
i64 shifts, allowing them to work with LegalizeDAGTypes.
6) Implement ExpandOperationResult support for X86 READCYCLECOUNTER and FP_TO_SINT,
allowing them to work with LegalizeDAGTypes.
LegalizeDAGTypes now passes several more X86 codegen tests when enabled and when
type legalization in LegalizeDAG is ifdef'd out.
llvm-svn: 44300
2007-11-24 07:07:01 +00:00
Chris Lattner
ab98c41337
add a note
...
llvm-svn: 44299
2007-11-24 06:13:33 +00:00
Chris Lattner
f5dfd15e98
upgrade this test
...
llvm-svn: 44298
2007-11-24 05:39:29 +00:00
Anders Carlsson
660bdd1c87
Keep track of whether the asm is volatile or not.
...
llvm-svn: 44297
2007-11-23 23:12:25 +00:00
Chris Lattner
893fe3bbd1
Fix PR1816, by correcting the broken definition of APInt::countTrailingZeros.
...
llvm-svn: 44296
2007-11-23 22:42:31 +00:00
Chris Lattner
69ec1ec86a
simplify some code.
...
llvm-svn: 44295
2007-11-23 22:36:49 +00:00
Chris Lattner
c2c4c7456c
Fix APInt::countTrailingZeros to return BitWidth if the input is zero instead of returning some random large number.
...
llvm-svn: 44294
2007-11-23 22:36:25 +00:00
Chris Lattner
0cf083815a
add a comment.
...
llvm-svn: 44293
2007-11-23 22:35:18 +00:00
Chris Lattner
7514abe56e
splice some lines together, no functionality change.
...
llvm-svn: 44292
2007-11-23 22:34:59 +00:00
Chris Lattner
752b05fe94
!< is >=, not >. Thanks to Max Hailperin for pointing this out!
...
llvm-svn: 44291
2007-11-23 22:19:33 +00:00
Chris Lattner
136449a6d7
improve codegen for global variable initializers, implementing
...
test/CodeGen/global-with-initialiser.c
Patch by Oliver Hunt!
llvm-svn: 44290
2007-11-23 22:07:55 +00:00
Anders Carlsson
80a5ea3552
Check asm input and output expressions.
...
llvm-svn: 44289
2007-11-23 19:43:50 +00:00
Duncan Sands
8a3e9d2bee
Ding dong, the DoesntAccessMemoryFns and
...
OnlyReadsMemoryFns tables are dead! We
get more, and more accurate, information
from gcc via the readnone and readonly
function attributes.
llvm-svn: 44288
2007-11-23 19:30:27 +00:00
Duncan Sands
b23192f483
Remove some logic I thoughtlessly copied over
...
from the old ADCE implementation (there it was
correct because the transform was being done
for read-only functions).
llvm-svn: 44287
2007-11-23 09:10:17 +00:00
Chris Lattner
a8fbde3f78
Fix a bug where we'd try to find a scev value for a bitcast operand,
...
even though the bitcast operand did not have integer type. This fixes
PR1814.
llvm-svn: 44286
2007-11-23 08:46:22 +00:00
Chris Lattner
9fcdc52243
Fix PR1820, an incredibly subtle macro expansion bug that Neil discovered.
...
Neil, please review this fix.
llvm-svn: 44285
2007-11-23 06:50:21 +00:00
Chris Lattner
1985d96dc9
Fix PR1817.
...
llvm-svn: 44284
2007-11-22 23:47:13 +00:00
Chris Lattner
a717ce7c70
add some static icmpinst predicates.
...
llvm-svn: 44283
2007-11-22 23:43:29 +00:00
Chris Lattner
176d048901
add missing #include
...
llvm-svn: 44282
2007-11-22 23:19:05 +00:00
Anton Korobeynikov
59c11686cc
Don't crash on bogus llvm.noinline. This is first part of PR1817 (preventing reduction)
...
llvm-svn: 44281
2007-11-22 22:30:10 +00:00
Duncan Sands
a915b538d3
Turn invokes of nounwind functions into ordinary calls.
...
llvm-svn: 44280
2007-11-22 22:24:59 +00:00
Duncan Sands
38a5e82ef4
Teach alias analysis about readnone/readonly functions.
...
Based on a patch by Török Edwin.
llvm-svn: 44279
2007-11-22 21:43:27 +00:00
Duncan Sands
1c97d752df
Readonly/readnone functions are allowed to throw
...
exceptions, so don't turn invokes of them into
calls.
llvm-svn: 44278
2007-11-22 21:40:06 +00:00
Chris Lattner
5241695dca
resolve the last fixme's in the new tblgen parser.
...
llvm-svn: 44277
2007-11-22 21:06:59 +00:00
Chris Lattner
695506c046
change the Init print methods to return strings, and implement
...
print in terms of that.
llvm-svn: 44276
2007-11-22 21:05:25 +00:00
Chris Lattner
1b1e96b8d7
eliminate a bunch of print methods that are duplicate with the getAsString() method.
...
llvm-svn: 44275
2007-11-22 20:51:34 +00:00
Chris Lattner
f4127dd48e
Rewrite the tblgen parser in a recursive descent style, eliminating the bison parser.
...
This makes the parser much easier to understand, eliminates a ton of global variables,
and gives tblgen nice caret diagnostics. It is also faster, but tblgen probably doesn't
care about performance.
There are a couple of FIXMEs which I will take care of next.
llvm-svn: 44274
2007-11-22 20:49:04 +00:00
Duncan Sands
a89a113a20
Rename the 'const' parameter attribute to 'readnone',
...
and the 'pure' parameter attribute to 'readonly'.
Names suggested by DannyB.
llvm-svn: 44273
2007-11-22 20:23:04 +00:00
Nick Lewycky
3783b46f9e
Instead of calculating constant factors, calculate the number of trailing
...
bits. Patch from Wojciech Matyjewicz.
llvm-svn: 44268
2007-11-22 07:59:40 +00:00
Nick Lewycky
016547d226
Create nodes for inline asm so that we don't crash looking for the node later.
...
llvm-svn: 44267
2007-11-22 03:07:37 +00:00
Anders Carlsson
94ea8aab34
Store output and input operands as well as clobber information in the AsmStmt. Ted, could you please review the serialization/deserialization code?
...
llvm-svn: 44266
2007-11-22 01:36:19 +00:00
Anders Carlsson
091a059c55
GCC fails if there is a trailing colon but no clobbers.
...
llvm-svn: 44265
2007-11-21 23:27:34 +00:00
Chuck Rose III
738fa17c4e
Switching back to strtoll. Including config.h. On VStudio builds, this overrides strtoll.
...
llvm-svn: 44264
2007-11-21 19:36:25 +00:00
Duncan Sands
b87dde7e8e
Fix a bug in which node A is replaced by node B, but later
...
node A gets back into the DAG again because it was hiding in
one of the node maps: make sure that node replacement happens
in those maps too.
llvm-svn: 44263
2007-11-21 16:43:19 +00:00
Nick Lewycky
1d6f196245
typo
...
llvm-svn: 44262
2007-11-21 05:21:54 +00:00
Dale Johannesen
e70850cf7b
Fix compiler warning.
...
llvm-svn: 44261
2007-11-21 00:45:00 +00:00
Chuck Rose III
07b57d2626
This change does a couple of things. First it gets the Visual Studio builds working.
...
I added the lexing files to the VStudio projects and removed the .l files from the
VStudio projects. There was a problem with use of strtoll in TGLexer.cpp and Chris
suggested switching to strtol, so that's included here.
Additionally, this checkin adds minimal x64 builds to the VStudio builds. Build issues
related to x64 in the windows specific files for DynamicLibrary.inc and Singals.inc
are worked around, but not ultimately solved. Binaries used to be stored in
...\win32\{Debug|Release}
but are now kept in
...\win32\bin\{win32|x64}\{Debug|Release}
intermediate files will continue to be stored in the individual project directories under
win32.
Some names will likely change in the future to reflect that the vstudio projects
are no longer 32-bit only, but I wanted to get things up and running today so kept away
from bigger restructuring.
llvm-svn: 44260
2007-11-21 00:37:56 +00:00
Dale Johannesen
f265bec4b0
File missing from previous patch.
...
llvm-svn: 44259
2007-11-20 23:25:17 +00:00
Dale Johannesen
763e110a9f
Fix .eh table linkage issues on Darwin. Some EH support
...
for Darwin PPC, but it's not fully working yet.
llvm-svn: 44258
2007-11-20 23:24:42 +00:00
Chris Lattner
8b9ecdad0c
Add the ability to convert a tblgen type to a string.
...
llvm-svn: 44257
2007-11-20 22:25:16 +00:00
Anders Carlsson
81a5a69682
Store inline asm code in the AST.
...
llvm-svn: 44255
2007-11-20 19:21:03 +00:00
Anders Carlsson
4f8eb127e1
Add __builtin_abs
...
llvm-svn: 44254
2007-11-20 19:05:17 +00:00
Chris Lattner
5c3f1541a7
Improve function decl merging, patch by Oliver Hunt!
...
llvm-svn: 44253
2007-11-20 19:04:50 +00:00
Duncan Sands
04eb67e69a
In order for parameter attribute uniquing to make
...
any sense it is important that ParamAttr::None gets
treated the same as not supplying an attribute at
all. Rather than stripping ParamAttr::None out of
the list of attributes, assert if ParamAttr::None
is seen. Fix up the bitcode reader which liked to
insert ParamAttr::None all over the place. Patch
based on one by Török Edwin.
llvm-svn: 44250
2007-11-20 14:09:29 +00:00
Nick Lewycky
74a26e3750
Small cleanup. Use APInt::getHighBitsSet method instead of shift left.
...
"setcc" -> "icmp op" in comments. No functionality change.
llvm-svn: 44249
2007-11-20 08:44:50 +00:00
Nick Lewycky
5b18bd3368
Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.
...
llvm-svn: 44248
2007-11-20 08:24:44 +00:00
Ted Kremenek
9e823c745d
Added another test case for the Dead Stores checker that tests that
...
block-level expressions are evaluated the same as regular expressions. Test
case provided by Nuno Lopes.
llvm-svn: 44247
2007-11-20 03:03:00 +00:00
Ted Kremenek
9d0acca967
Updated CFGStmtVisitor and CFGRecStmtVisitor to have a notion of
...
"block-expressions" when visiting arbitrary expressions (via calls to
"Visit()"). This results in a refactoring where a dataflow analysis no
longer needs to always special case when handling block-expressions versus
non-block expressions.
Updated LiveVariables and UninitializedValues to conform to the slightly
altered interface of these visitor classes.
Thanks to Nuno Lopes for providing a test case that illustrated some
fundamental problems in the current design of the CFGXXXStmtVisitor classes
and how they were used.
llvm-svn: 44246
2007-11-20 03:01:58 +00:00
Chris Lattner
6edac0ad1d
Testcase for PR1811
...
llvm-svn: 44244
2007-11-19 21:43:22 +00:00
Chris Lattner
09c0393d5e
ExpandUnalignedLoad doesn't handle vectors right at all apparently.
...
Fix a couple of problems:
1. Don't assume the VT-1 is a VT that is half the size.
2. Treat vectors of FP in the vector path, not the FP path.
This has a couple of remaining problems before it will work with
the code in PR1811: the code below this change assumes that it can
use extload/shift/or to construct the result, which isn't right for
vectors.
This also doesn't handle vectors of 1 or vectors that aren't pow-2.
llvm-svn: 44243
2007-11-19 21:38:03 +00:00
Chris Lattner
6fa95ec19d
Implement vector expand support for shuffle_vector. This fixes PR1811.
...
llvm-svn: 44242
2007-11-19 21:16:54 +00:00
Dan Gohman
aad83c8ee5
Remove meaningless qualifiers from return types, avoiding compiler warnings.
...
llvm-svn: 44240
2007-11-19 20:46:23 +00:00
Chris Lattner
67d77945e7
Implement splitting of UNDEF nodes. This is the first step towards fixing PR1811
...
llvm-svn: 44239
2007-11-19 20:21:32 +00:00
Ted Kremenek
e866e7b6fc
Removed PersistentMap. It is now superseded in every way by the ImmutableMap
...
and ImmutableSet classes in the main LLVM libraries.
llvm-svn: 44237
2007-11-19 17:25:30 +00:00
Owen Anderson
c280216c00
Teach me to do stuff late at night.
...
llvm-svn: 44236
2007-11-19 16:10:59 +00:00
Dan Gohman
12a8610490
Fix a typo in a comment.
...
llvm-svn: 44235
2007-11-19 15:36:19 +00:00
Dan Gohman
d32081002e
Add explicit keywords.
...
llvm-svn: 44234
2007-11-19 15:30:20 +00:00
Dan Gohman
36347a26f9
Add support in SplitVectorOp for remainder operators.
...
llvm-svn: 44233
2007-11-19 15:15:03 +00:00
Owen Anderson
99057116f6
Fix a factually incorrect statement pointed out by Max Hailperin.
...
llvm-svn: 44228
2007-11-19 07:44:43 +00:00
Chris Lattner
4205d25f06
Record the start of the current token, for use in error reporting.
...
llvm-svn: 44227
2007-11-19 07:43:52 +00:00
Chris Lattner
1a26296453
Add carat diagnostics to tblgen lexer errors.
...
llvm-svn: 44226
2007-11-19 07:38:58 +00:00
Ted Kremenek
eb8471bfa1
Added test case for dead stores checker (live variables analysis) that tests
...
for correct propagation/update of liveness information within subexpressions
of Block-Level expressions. Test case provided by Nuno Lopes.
llvm-svn: 44225
2007-11-19 06:38:23 +00:00
Ted Kremenek
850f1155ad
Fixed bug where LiveVariables was not properly propagating updates to liveness
...
state that occurred in subexpressions of Block-Level expressions. Bug and fix
provided by Nuno Lopes.
llvm-svn: 44224
2007-11-19 06:36:49 +00:00
Anders Carlsson
9c1011c090
Put back the flags field in the constant CF string type.
...
llvm-svn: 44222
2007-11-19 00:25:30 +00:00
Ted Kremenek
094079c0dc
Added test case for dead-stores checker. Test case provided by Nuno Lopes.
...
llvm-svn: 44221
2007-11-18 20:06:35 +00:00
Ted Kremenek
7016e4d509
Fixed bug in WalkaST_VisitDeclSubExprs where we failed to properly check if
...
the StmtIterator referring to the initializers of a chain of Decls was equal
to the "end" iterator. The particular bug manifested when an iterator was
created on a chain of decls with no initializers.
Thanks to Nuno Lopes for reporting this bug and providing a patch.
llvm-svn: 44220
2007-11-18 20:06:01 +00:00
Chris Lattner
44158478bb
Fix the Linker testcase regressions, by making MemoryBuffer::getFileOrSTDIN return
...
a valid but empty buffer if stdin is empty.
llvm-svn: 44219
2007-11-18 18:52:28 +00:00
Chris Lattner
b01e500f16
autoupgrade files that use callfoo as call foo.
...
llvm-svn: 44218
2007-11-18 18:43:24 +00:00
Chris Lattner
f527037485
print a call to a fastcc function as:
...
call x86_fastcallcc void @func( i32* %X, i64 0 )
not:
callx86_fastcallcc void @func( i32* %X, i64 0 )
This fixes Codegen/X86/fast-cc-merge-stack-adj.ll
llvm-svn: 44217
2007-11-18 18:32:16 +00:00
Chris Lattner
861302e264
fix bogus test that the more strict lexer is finding.
...
llvm-svn: 44216
2007-11-18 18:26:45 +00:00
Chris Lattner
c3cc30cdb8
Bugfix, this fixes CodeGen/X86/ldzero.ll and CodeGen/X86/2007-10-16-fp80_select.ll
...
llvm-svn: 44215
2007-11-18 18:25:18 +00:00
Chris Lattner
660c6b9a92
Replace the original flex lexer with a hand writen one. This
...
drops a dependency on flex and lets us make future progress more
easily. Yay for 2 fewer .cvs files to make silly conflicts with.
llvm-svn: 44213
2007-11-18 08:46:26 +00:00
Chris Lattner
6070028736
minor cleanups
...
llvm-svn: 44212
2007-11-18 05:48:46 +00:00
Chris Lattner
98c39513ab
ensure header is self contained.
...
llvm-svn: 44211
2007-11-18 05:25:45 +00:00
Chris Lattner
da4ab67127
reimplement the tblgen lexer with a simple hand-written lexer. This eliminates
...
one dependency on flex and gets rid of two ".cvs" files.
llvm-svn: 44210
2007-11-18 02:57:27 +00:00
Steve Naroff
14f5f79bb6
Now that we are passing back "free standing decls", make sure -ast-dump works like -ast-print.
...
Also added a cast to be safe...
llvm-svn: 44209
2007-11-17 21:37:36 +00:00
Steve Naroff
c1e6d60b14
Make sure Sema::ParsedFreeStandingDeclSpec() returns a decl representing the type.
...
Adding basic printing to StmtPrinter::PrintRawDecl().
llvm-svn: 44208
2007-11-17 21:21:01 +00:00
Nate Begeman
d4d45c268c
Add support for vectors to int <-> float casts.
...
llvm-svn: 44204
2007-11-17 03:58:34 +00:00
Ted Kremenek
b6c40f3f1b
Reverted patch 44199:
...
http://llvm.org/viewvc/llvm-project?rev=44199&view=rev
This patch completely broke serialization due to an invariant I assumed but
did not hold. The assumed invariant was that all pointer IDs emitted by a call
to BatchEmitOwnedPtrs would be consecutive. This is only the case if there has
been no forward references to an owned pointer (and hence already registered
with the Serializer object).
llvm-svn: 44203
2007-11-17 03:34:33 +00:00
Dale Johannesen
7d97662467
Remove indeterminism from a loop. We think this will
...
fix an occasional nonrepeatable bootstrap failure we've
been seeing on Darwin.
llvm-svn: 44202
2007-11-17 02:48:01 +00:00
Dale Johannesen
06a10df562
Fix denormal check in float->APInt conversion.
...
PR 1804.
llvm-svn: 44201
2007-11-17 01:02:27 +00:00
Ted Kremenek
9d89f980aa
Changed implementation of Serialize::EmitDiffPtrID and
...
Deserialize::ReadDiffPtrID to read and emit bools instead of unsigned
integers. This should result in a nice space optimization once we have
"auto-abbreviation" generation in place.
llvm-svn: 44200
2007-11-17 00:45:37 +00:00
Ted Kremenek
4d1e79c8ac
Implemented optimization for BatchEmitOwnedPtrs that we only emit one complete
...
SerializedPtrID, followed by the *differences* in IDs. The big idea is that
most IDs will be just be 1 off from the previous (either that or NULL, which
we encode as a difference if 0), so this will greatly reduce the encoding
space for extra IDs to just 1 bit per pointer.
So far this optimization reduces serialization of Carbon.h by only 1%, but
we aren't using any abbreviations now in the Bitcode file to properly take
advantage of this optimization.
llvm-svn: 44199
2007-11-17 00:40:45 +00:00
Evan Cheng
8e22379303
Live interval splitting:
...
When a live interval is being spilled, rather than creating short, non-spillable
intervals for every def / use, split the interval at BB boundaries. That is, for
every BB where the live interval is defined or used, create a new interval that
covers all the defs and uses in the BB.
This is designed to eliminate one common problem: multiple reloads of the same
value in a single basic block. Note, it does *not* decrease the number of spills
since no copies are inserted so the split intervals are *connected* through
spill and reloads (or rematerialization). The newly created intervals can be
spilled again, in that case, since it does not span multiple basic blocks, it's
spilled in the usual manner. However, it can reuse the same stack slot as the
previously split interval.
This is currently controlled by -split-intervals-at-bb.
llvm-svn: 44198
2007-11-17 00:40:40 +00:00
Evan Cheng
aa72f72bd3
Shrinkfy.
...
llvm-svn: 44197
2007-11-17 00:31:16 +00:00
Evan Cheng
13e8b022f5
Typo.
...
llvm-svn: 44196
2007-11-16 23:55:08 +00:00
Dale Johannesen
a674612d94
Testcase from PR 1508 (although its's somewhat
...
orthogonal to the main problem there)
llvm-svn: 44194
2007-11-16 23:16:35 +00:00
Tanya Lattner
1db762ba63
Fix for PR1801
...
llvm-svn: 44193
2007-11-16 22:44:50 +00:00
Ted Kremenek
f115550f6f
Added assertion in serialization of DeclRefExprs. DeclRefExprs can only
...
own the decl they reference if it is a FunctionDecl. Note that his
ownership property is still considered a hack, and should be fixed.
llvm-svn: 44192
2007-11-16 19:00:35 +00:00
Ted Kremenek
50d7f6f620
Fixed bug in the serialization of FunctionDecls. We would incorrectly
...
query for the number of parameters for FunctionDecls that had type
FunctionTypeNoProto.
llvm-svn: 44191
2007-11-16 18:11:10 +00:00
Chris Lattner
48d52848d7
Tighten up address-of checking, implementing test/Sema/expr-address-of.c.
...
This fixes a bug reported by Seo Sanghyeon.
This was meant to be committed yesterday, but the commit failed. doh.
llvm-svn: 44190
2007-11-16 17:46:48 +00:00
Anton Korobeynikov
b8a47244ac
These were implemented
...
llvm-svn: 44189
2007-11-16 11:12:01 +00:00
Chris Lattner
c53b18362a
Fix PR1800 by correcting mistaken logic.
...
llvm-svn: 44188
2007-11-16 06:04:17 +00:00
Chris Lattner
1b3f58a816
fix a typo
...
llvm-svn: 44187
2007-11-16 05:32:05 +00:00
Anton Korobeynikov
91460e43f1
Implement codegen for flt_rounds on x86
...
llvm-svn: 44183
2007-11-16 01:31:51 +00:00
Anton Korobeynikov
66b91e66ec
Implement necessary bits for flt_rounds gcc builtin.
...
Codegen bits and llvm-gcc support will follow.
llvm-svn: 44182
2007-11-15 23:25:33 +00:00
Nate Begeman
bd117f06ba
Basic non-power-of-2 vector support
...
llvm-svn: 44181
2007-11-15 21:15:26 +00:00
Chris Lattner
0640e3ef35
Fix transient failure on Lex/c90.c due to an uninit variable.
...
llvm-svn: 44180
2007-11-15 19:22:40 +00:00
Chris Lattner
4dcbc2090a
add header file I forgot to check in
...
llvm-svn: 44179
2007-11-15 19:22:18 +00:00
Chris Lattner
609d413363
fix a bug Steve noticed, where a #import of the main file itself would fail.
...
llvm-svn: 44178
2007-11-15 19:07:47 +00:00
Anton Korobeynikov
6a7ddfdb8f
Reverted r44163 per request
...
llvm-svn: 44177
2007-11-15 18:33:16 +00:00
Ted Kremenek
07941e21e9
Added hack when serializing DeclRefExprs. This should probably be fixed.
...
Some FunctionDecls do not appear at the top-level or are owned by a DeclStmt.
In calls to implicitly defined functions, a FunctionDecl is created, but only
the DeclRefExprs reference them. Since an implicitly defined function may be
called multiple times, there is no clear ownership model for such objects.
Temporary solution: when serializing out DeclRefExprs, emit an ownership bit
for the Decl. This bit is determined by querying the serializer to see if the
Decl has already been serialized. If it hasn't, emit the Decl as an owned
pointer.
I repeat: this is a hack. This should be fixed.
llvm-svn: 44176
2007-11-15 18:26:39 +00:00
Ted Kremenek
4791e1a7bd
Started separate section for method definitions for ObjC serialization.
...
Added missing deserialization case in Stmt::Create() switch statement.
llvm-svn: 44175
2007-11-15 18:10:29 +00:00
Daniel Berlin
bb3b099f82
Fix bugs in iterator invalidation
...
llvm-svn: 44174
2007-11-15 18:06:49 +00:00
Steve Naroff
c8fcbe09d0
No need to forward declare definition of objc_super...
...
llvm-svn: 44173
2007-11-15 17:06:21 +00:00
Steve Naroff
e3ffc2f4a9
Finish up variadic methods/messages.
...
llvm-svn: 44172
2007-11-15 13:05:42 +00:00
Steve Naroff
d8ea1ac576
Implement support for variadic methods (work in progress).
...
llvm-svn: 44171
2007-11-15 12:35:21 +00:00
Steve Naroff
05caa48fb4
Extend RewriteTest::RewriteObjCIvarRefExpr() to cope with static typing (when using -> on a type which corresponds to the implementation type).
...
llvm-svn: 44170
2007-11-15 11:33:00 +00:00
Steve Naroff
44864e48bd
Tweak funky cast to accommodate messaging 'super'. This removes any spurious warnings.
...
llvm-svn: 44169
2007-11-15 10:43:57 +00:00
Steve Naroff
7fa2f040f3
Rewrite for messaging 'super'.
...
The code gen. results in some spurious warnings...a cast is forthcoming.
llvm-svn: 44168
2007-11-15 10:28:18 +00:00
Duncan Sands
d4494352f8
This assertion was bogus.
...
llvm-svn: 44167
2007-11-15 09:54:37 +00:00
Evan Cheng
2c1a50455c
Fix a thinko in post-allocation coalescer.
...
llvm-svn: 44166
2007-11-15 08:13:29 +00:00
Nate Begeman
847bfbcaf0
Break out bool/true/false support into a LangOption
...
llvm-svn: 44164
2007-11-15 07:30:50 +00:00
Nick Lewycky
fbb24817cc
Fix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEV
...
is disabled in the sense that it will refuse to create one from a UDiv
instruction, until the code is better tested.
llvm-svn: 44163
2007-11-15 06:30:50 +00:00
Chris Lattner
0841c3b560
Fix PR1788 by taking the approach suggested by Richard Smith.
...
Thanks to him for his detailed analysis of the problem.
llvm-svn: 44162
2007-11-15 06:10:55 +00:00
Chris Lattner
820c1447b4
Import the boost scoped_ptr class to LLVM. This patch was prepared by
...
Cédric Venet.
llvm-svn: 44161
2007-11-15 05:57:06 +00:00
Nate Begeman
4c18c23eb3
Implement codegen of CXX Bool
...
llvm-svn: 44160
2007-11-15 05:40:03 +00:00
Chris Lattner
bb31a42fef
Handle "bool" in all places that touch _Bool.
...
This fixes code like "if((bool)x) {}" for example.
Patch by Nate Begeman.
llvm-svn: 44159
2007-11-15 05:25:19 +00:00
Owen Anderson
1b74a9a628
More templatization.
...
llvm-svn: 44158
2007-11-15 05:00:15 +00:00
Chris Lattner
add10eecf9
many edits, patch by Kelly Wilson!
...
llvm-svn: 44157
2007-11-15 04:51:31 +00:00
Steve Naroff
f60782b8c9
- Implement ivar rewrite (patch by Fariborz).
...
- RewriteMessageExpr()...make implicit casts explicit with synthesizing call (removing warnings when calling objc_msgSend()).
llvm-svn: 44156
2007-11-15 02:58:25 +00:00
Bill Wendling
b3712f8146
Adding debug output during coalescing.
...
llvm-svn: 44154
2007-11-15 02:06:30 +00:00
Bill Wendling
8269925b1e
Need to increment the iterator.
...
llvm-svn: 44153
2007-11-15 00:40:48 +00:00
Ted Kremenek
c5f3e5371c
Fixed serious bug in BatchReadOwnedPtrs where in a chain of calls to
...
deserialize objects if BatchReadOwnedPtrs was called more than once in the
same call chain then the second call would overwrite the SerializedPtrIDs
being used by the first call. Solved this problem by making the vector that
holds the pointer IDs local to a function call. Now BatchReadOwnedPtrs is
reentrant.
llvm-svn: 44152
2007-11-15 00:05:03 +00:00
Steve Naroff
909d666681
Refinement to previous commit. Always cast the first argument to "id"...no need to special case self.
...
llvm-svn: 44149
2007-11-15 00:00:21 +00:00
Steve Naroff
e7f181986a
Cast implicit "self" argument to "id". This removes all warnings associated with implicit references to self. It doesn't yet deal withexplicit references to self...
...
llvm-svn: 44148
2007-11-14 23:54:14 +00:00
Ted Kremenek
cf7a20a6c4
Fixed bug in serialization of EnumConstantDecl where we improperly
...
"default constructed" an APSInt. Fixed another bug in the same method
where we did not allow the NextDeclarator to be NULL.
llvm-svn: 44147
2007-11-14 23:38:09 +00:00
Ted Kremenek
c77e5a126c
Fixed bug when serializing QualTypes where we were serializing in the
...
qualifiers as part of the pointer address.
llvm-svn: 44146
2007-11-14 23:35:01 +00:00
Steve Naroff
03f2767368
Always generate a typedef for @class. The typedef removal logic that I'm removing only made sense when we were operating on preprocess files without typedef guards. Now that we have guards, it is incorrect to ever remove one (since it may increase the likelihood that the rewritten header can't be included stand alone).
...
llvm-svn: 44145
2007-11-14 23:02:56 +00:00
Chris Lattner
174a825f01
Fix a rewriter bug that steve noticed. Don't skip arbitrary things
...
between an @ and a p, just skip whitespace.
llvm-svn: 44144
2007-11-14 22:57:51 +00:00
Ted Kremenek
83b75f5ee8
Added QualType::ReadBackpatch to allow QualType initialization with
...
backpatching. This original was available, but then we removed it. It is back
again to help with deserialization of FieldDecls. Because FieldDecls are
currently owned by RecordDecls, which are owned by a TagType, the type of the
FieldDecl may not be deserialized prior to deserializing the FieldDecl. Thus
backpatching solves the problem of constructing a FieldDecl that references a
type that has not yet been deserialized.
Simplified serialization of TagType to not require passing in the
SerializedPtrID. Registration of the materialized type object is done after
the CreateImpl method returns (as with other types).
llvm-svn: 44143
2007-11-14 22:51:02 +00:00
Fariborz Jahanian
c6225532c3
Patch to comment out use of protocol qualifiers when rewriting ivars.
...
llvm-svn: 44142
2007-11-14 22:26:25 +00:00
Duncan Sands
f171b35c8b
I discover array_lengthof, thanks to gabor on #llvm.
...
llvm-svn: 44139
2007-11-14 21:58:02 +00:00
Ted Kremenek
e25b79ff84
Implemented serialization of InitListExpr.
...
llvm-svn: 44137
2007-11-14 21:31:46 +00:00
Ted Kremenek
3db07a7016
Implemented serialization of CompoundLiteralExpr.
...
llvm-svn: 44134
2007-11-14 21:18:36 +00:00
Ted Kremenek
fab0c76a25
Added serialization of Union decls.
...
llvm-svn: 44133
2007-11-14 21:15:42 +00:00
Duncan Sands
730a32643f
Tweak the descriptions of the new 'const' and 'pure' attributes.
...
llvm-svn: 44132
2007-11-14 21:14:02 +00:00
Ted Kremenek
00e0b40599
Removed assertion inserted only for temporary debugging.
...
llvm-svn: 44131
2007-11-14 19:36:11 +00:00
Ted Kremenek
ec56081f38
Added missing break statement.
...
Reordered serialization methods for FunctionTypeProto and FunctionTypeNoProto
to be alphabetical by serialized type name.
llvm-svn: 44130
2007-11-14 19:33:01 +00:00
Steve Naroff
dde78986fb
Fairly major surgery to RewriteTest::SynthesizeObjcInternalStruct().
...
This allows us to handle funky stuff like...
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
@interface NSLayoutManager : NSObject <NSCoding, NSGlyphStorage> {
#else /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */
@interface NSLayoutManager : NSObject <NSCoding> {
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */
...which now rewrites to...
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
#ifndef _REWRITER_typedef_NSLayoutManager
#define _REWRITER_typedef_NSLayoutManager
typedef struct objc_object NSLayoutManager;
#endif
struct NSLayoutManager {
struct NSObject _NSObject;
#else /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */
// @interface NSLayoutManager : NSObject <NSCoding> {
#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 */
llvm-svn: 44129
2007-11-14 19:25:57 +00:00
Evan Cheng
0cbe920d7c
Oops. Debugging code shouldn't have been checked in.
...
llvm-svn: 44128
2007-11-14 19:08:32 +00:00
Ted Kremenek
26ba7973ea
Implemented serialization of EnumDecl and EnumConstantDecl.
...
llvm-svn: 44127
2007-11-14 18:12:19 +00:00
Ted Kremenek
8e93ca3de5
Implemented serialization of FieldDecls.
...
llvm-svn: 44126
2007-11-14 17:47:01 +00:00
Ted Kremenek
31ae973708
SourceManager, IdentifierTable, Selectors are now serialized in their own
...
block separate from ASTContext. This block is serialized out AFTER writing out
ASTContext, but deserialized BEFORE reading in ASTContext. This permits the
optimization of the serialization of the IdentifierTable where we only write
out identifiers that are used.
This was needed because TagDecls are owned by Types, and TagDecls contain
identifiers. Thus types need to be written out first to register with the
serializer any identifiers they refer to (and hence need to be serialized out
with IdentifierTable).
llvm-svn: 44125
2007-11-14 17:46:35 +00:00
Ted Kremenek
1172416d65
Removed debug #define that was accidentally checked in while debugging
...
the deserializer.
Fixed assertion when "stream jumping" in the deserializer to properly function
when we have reached the end of the stream.
llvm-svn: 44124
2007-11-14 17:42:09 +00:00
Fariborz Jahanian
794793ec1c
Removed unused variabel.
...
llvm-svn: 44123
2007-11-14 17:35:46 +00:00
Chris Lattner
e6c7a858b0
Fix a bug handling hex floats in c90 mode, pointed out by Neil.
...
llvm-svn: 44120
2007-11-14 16:14:50 +00:00
Steve Naroff
a509f04034
Fix yesterday's regression with rewriting @optional/@required.
...
llvm-svn: 44119
2007-11-14 15:03:57 +00:00
Steve Naroff
58ed6c04f2
Rewrite methods that span multiple lines.
...
llvm-svn: 44118
2007-11-14 14:34:23 +00:00
Steve Naroff
9e0887cff4
Allow properties within a protocol. The case below was asserting...now it works fine.
...
@protocol CAMediaTiming
@property int beginTime;
@end
Comments in the code tell the rest of the story...
llvm-svn: 44117
2007-11-14 14:15:31 +00:00
Duncan Sands
9e12a3f020
Simplify the attribute verification code.
...
llvm-svn: 44116
2007-11-14 14:02:11 +00:00
Duncan Sands
544e64aa96
Un XFAIL these tests, now that Bill has backported
...
the fix from 4.2.
llvm-svn: 44115
2007-11-14 13:40:53 +00:00
Anton Korobeynikov
46f4446bba
Document pure/const parameter attributes
...
llvm-svn: 44111
2007-11-14 10:30:13 +00:00
Anton Korobeynikov
6ca98cd532
Regenerate
...
llvm-svn: 44110
2007-11-14 09:53:48 +00:00
Anton Korobeynikov
ea09c697d7
Add pure/const attributes. Documentation will follow.
...
llvm-svn: 44109
2007-11-14 09:52:30 +00:00
Anton Korobeynikov
2c6387803e
Fix PIC jump table codegen on x86-32/linux. In fact, such thing should be applied
...
to all targets uses GOT-relative offsets for PIC (Alpha?)
llvm-svn: 44108
2007-11-14 09:18:41 +00:00
Duncan Sands
e2287ed552
Eliminate the recently introduced CCAssignToStackABISizeAlign
...
in favour of teaching CCAssignToStack that size 0 and/or align
0 means to use the ABI values. This seems a neater solution.
It is safe since no legal value type has size 0.
llvm-svn: 44107
2007-11-14 08:29:13 +00:00
Ted Kremenek
3c9c7b84fe
Implemented serialization of RecordDecls. Changed serialization of TagType to
...
have an owning pointer to the referred TagDecl. This should hopefully fix a
bug where TagDecls (including decls from structs, etc.) were not serialized.
llvm-svn: 44106
2007-11-14 08:06:37 +00:00
Ted Kremenek
545f7e39e1
Added two new overloaded versions of BatchEmitOwnedPtrs and
...
BatchReadOwnedPtrs.
llvm-svn: 44105
2007-11-14 08:05:03 +00:00
Evan Cheng
7f02cfa599
Clean up sub-register implementation by moving subReg information back to
...
MachineOperand auxInfo. Previous clunky implementation uses an external map
to track sub-register uses. That works because register allocator uses
a new virtual register for each spilled use. With interval splitting (coming
soon), we may have multiple uses of the same register some of which are
of using different sub-registers from others. It's too fragile to constantly
update the information.
llvm-svn: 44104
2007-11-14 07:59:08 +00:00
Duncan Sands
9c30fc234c
XFAIL these tests until the fix gets backported
...
from llvm-gcc-4.2 to 4.0.
llvm-svn: 44103
2007-11-14 07:42:50 +00:00
Chris Lattner
322a04ec7c
Document a limitation, patch contributed by George Russell
...
llvm-svn: 44102
2007-11-14 07:04:44 +00:00
Nick Lewycky
c6243020a6
Allow the block extractor take to take a list of basic blocks to not extract
...
from a file containing Function/BasicBlock pairings. This is not safe against
anonymous or abnormally-named Funcs or BBs.
Make bugpoint use this interface to pass the BBs list to the child bugpoint.
llvm-svn: 44101
2007-11-14 06:47:06 +00:00
Chris Lattner
07b201d9c0
implement test/Sema/typedef-prototype.c, allowing code
...
to declare a function with a typedef:
typedef int unary_int_func(int arg);
unary_int_func add_one;
This patch contributed by Seo Sanghyeon!
llvm-svn: 44100
2007-11-14 06:34:38 +00:00
Chris Lattner
a77e74edba
Implement PR1796 and Transforms/SimplifyCFG/noreturn-call.ll
...
by inserting unreachable after no-return calls.
llvm-svn: 44099
2007-11-14 06:19:25 +00:00
Steve Naroff
c17b056427
Comment out recent regression r44096.
...
llvm-svn: 44098
2007-11-14 03:37:28 +00:00
Owen Anderson
9306de0727
Start the process of making MachineLoopInfo possible by templating Loop.
...
llvm-svn: 44097
2007-11-14 02:33:58 +00:00
Fariborz Jahanian
fe38ba24af
Rewrite @optional/@required directives used inside protocol definitions.
...
llvm-svn: 44096
2007-11-14 01:37:46 +00:00
Fariborz Jahanian
da6165c3dc
Rewrite of forward protocol declaration.
...
llvm-svn: 44095
2007-11-14 00:42:16 +00:00
Ted Kremenek
164faf98f3
Implemented serialization of FunctionTypeNoProto.
...
llvm-svn: 44094
2007-11-14 00:38:50 +00:00
Ted Kremenek
7068cef079
Implemented serialization of VariableArrayTypes.
...
llvm-svn: 44093
2007-11-14 00:31:36 +00:00
Ted Kremenek
eef4a6296f
Implemented serialization of TypedefType.
...
llvm-svn: 44092
2007-11-14 00:27:46 +00:00
Ted Kremenek
ea27383d68
Implemented serialization of ConstantArrayType.
...
llvm-svn: 44091
2007-11-14 00:17:21 +00:00
Ted Kremenek
f35e589847
Implemented serialization of TagTypes.
...
llvm-svn: 44090
2007-11-14 00:03:56 +00:00
Ted Kremenek
919858a428
Modified ASTContext::getTagDeclType() to accept a NULL pointer for the passed
...
in TagDecl*. This allows the deserializer to use ASTContext to create the
TagTypes. Deserialize TagTypes then rely on pointer-backpatching to resolve
the decls.
This may not be the interface that we want, but as the implementation of
TagTypes will potentially change significantly in the future, I'm leaving this
for now. An appropriate FIXME is in place.
llvm-svn: 44089
2007-11-14 00:03:20 +00:00
Steve Naroff
971d2f1242
Fix regression with ObjC method definitions and -ast-print
...
llvm-svn: 44088
2007-11-13 23:48:03 +00:00
Fariborz Jahanian
bc92fd7542
Type encoding for structs.
...
llvm-svn: 44087
2007-11-13 23:21:38 +00:00
Hartmut Kaiser
6f5421cbee
Fixed a compilation error.
...
llvm-svn: 44083
2007-11-13 23:04:28 +00:00
Hartmut Kaiser
dde99f6a07
Fixed a strange construct. Please review.
...
llvm-svn: 44082
2007-11-13 23:04:06 +00:00
Hartmut Kaiser
1d4816584f
Updated VC++ build system
...
llvm-svn: 44081
2007-11-13 23:03:32 +00:00
Steve Naroff
7b8fa4746a
Rewrite method definition bodies. Also renamed a method to distinguish between method declarations and definitions.
...
llvm-svn: 44080
2007-11-13 23:01:27 +00:00
Ted Kremenek
204a1d3976
Removed line with typo (declared friendship with ASTContext). Line was
...
not needed since friendship is declared elsewhere.
llvm-svn: 44079
2007-11-13 22:57:59 +00:00
Ted Kremenek
767e7507c2
Added pretty-printing of statements during serialization.
...
llvm-svn: 44078
2007-11-13 22:56:10 +00:00
Ted Kremenek
049059a7db
Implemented serialization of AsmStmt (or rather what is currently implemented
...
in AsmStmt).
llvm-svn: 44077
2007-11-13 22:55:51 +00:00
Ted Kremenek
d86dcfe8ca
Fixed bug in FunctionDecl serialization where we crashed when the
...
FunctionDecl had decls for its parameters but still had greater than 0
arguments.
llvm-svn: 44076
2007-11-13 22:51:08 +00:00
Ted Kremenek
da551c3b1e
Implemented serialization for SizeOfAlignOfTypeExpr.
...
llvm-svn: 44075
2007-11-13 22:30:29 +00:00
Ted Kremenek
b8f51d5512
Implemented serialization for MemberExpr.
...
llvm-svn: 44074
2007-11-13 22:16:23 +00:00
Nate Begeman
a0f78974a6
Give AST-walk passes a way to access DeclSpec attributes on functions and
...
variables.
llvm-svn: 44073
2007-11-13 22:14:47 +00:00
Fariborz Jahanian
989e03989b
Fixed a rewrite of metadata bug when category implementation has no matching interface.
...
llvm-svn: 44072
2007-11-13 22:09:49 +00:00
Ted Kremenek
24726c3fc9
Rewrote type serialization to used the same methodology as we do for Decls.
...
Removed tons of dead code in ASTContext concerning how types use to be
serialized.
Removed serialization methods from QualType that are no longer used.
llvm-svn: 44070
2007-11-13 22:02:55 +00:00
Nate Begeman
313f8ca67b
Rename Sema method to follow class naming convention
...
llvm-svn: 44069
2007-11-13 21:49:48 +00:00
Chris Lattner
68f04fa941
Fix the regression on Transforms/GlobalOpt/deadglobal-2.ll from my
...
patch on friday.
llvm-svn: 44068
2007-11-13 21:46:23 +00:00
Chris Lattner
f150ace6cb
upgrade test
...
llvm-svn: 44067
2007-11-13 21:42:48 +00:00
Fariborz Jahanian
5633835d17
Populate metadata with adrress of method code.
...
llvm-svn: 44066
2007-11-13 21:02:00 +00:00
Chris Lattner
47791a4051
Parse "sizeof(arr)[0]" as a sizeof of an expr if arr
...
is an expression.
llvm-svn: 44065
2007-11-13 20:50:37 +00:00
Owen Anderson
d8167ab332
Run computeDomForest() on the set of registers that need to be tested for
...
interference.
llvm-svn: 44064
2007-11-13 20:13:24 +00:00
Owen Anderson
569ef71e44
Preserve LiveVariables when doing critical edge splitting.
...
llvm-svn: 44063
2007-11-13 20:04:45 +00:00
Fariborz Jahanian
c54d8462fb
Rewrite of method definitions in categories.
...
llvm-svn: 44062
2007-11-13 20:04:28 +00:00
Owen Anderson
4696e959fe
Wow. I definitely shouldn't write code when I'm tird.
...
Make my previous patch actually do what it was intended to do.
llvm-svn: 44061
2007-11-13 19:56:28 +00:00
Fariborz Jahanian
98ba6cde3d
Order of methods are OK and generated .c file can be compiled.
...
llvm-svn: 44060
2007-11-13 19:21:13 +00:00
Ted Kremenek
794d8a6cde
Updated test case to flag about comparisons against constants. We may
...
invert this case (i.e., not flag a warning) in the future.
llvm-svn: 44059
2007-11-13 19:18:22 +00:00
Ted Kremenek
b83f182b59
Modified -Wfloat-equal logic to suppress warnings where floating point values
...
are compared against builtins such as __builtin_inf.
llvm-svn: 44058
2007-11-13 19:17:00 +00:00
Dale Johannesen
7904708369
Revert previous; these files aren't ready to go in yet.
...
llvm-svn: 44057
2007-11-13 19:16:02 +00:00
Dale Johannesen
7a7085f6d3
Add parameter to getDwarfRegNum to permit targets
...
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.
llvm-svn: 44056
2007-11-13 19:13:01 +00:00
Fariborz Jahanian
1e5f64e2ea
First patch in rewrie of method definitions. This is work in progress.
...
llvm-svn: 44055
2007-11-13 18:44:14 +00:00
Ted Kremenek
577437de8b
Updated diagnostic for -Wfloat-equal to underline the offending expressions.
...
llvm-svn: 44054
2007-11-13 18:40:33 +00:00
Ted Kremenek
2272f72723
Added -Wfloat-equal option to the driver. This makes warnings about
...
floating point comparisons using == or != an opt-in rather than a default
warning.
Updated test case to use -Wfloat-equal.
llvm-svn: 44053
2007-11-13 18:37:02 +00:00
Chris Lattner
07328f0b8b
Make llvm2cpp better, patch for PR1794, contributed by Zack Rusin.
...
llvm-svn: 44051
2007-11-13 18:22:33 +00:00
Chris Lattner
034b49dca0
Clean up types, removing some casts. Patch contributed by
...
Cedric Venet.
llvm-svn: 44050
2007-11-13 18:16:41 +00:00
Chris Lattner
2f72c427cf
improve handling of address of global when checking for
...
constants and initializers. Patch by Sanghyeon Seo, thanks!
llvm-svn: 44049
2007-11-13 18:05:45 +00:00
Evan Cheng
c891ae92dc
Fix x86-64 jit: remove reliance on Dwarf numbers.
...
llvm-svn: 44048
2007-11-13 17:54:34 +00:00
Steve Naroff
b666625493
Teach Sema::CheckCompareOperands() about "void *" (C99 6.5.9p2)
...
llvm-svn: 44047
2007-11-13 14:57:38 +00:00
Bill Wendling
77b13af9a6
Unifacalize the CALLSEQ{START,END} stuff.
...
llvm-svn: 44045
2007-11-13 09:19:02 +00:00
Chris Lattner
61ce4dff7a
Implement PR1786 by iterating between dead cycle elimination
...
and simplifycfg in the rare cases when it is needed.
llvm-svn: 44044
2007-11-13 07:32:38 +00:00
Chris Lattner
36d5575660
Many typos, grammaro, and wording fixes. Patch by
...
Kelly Wilson, thanks!
llvm-svn: 44043
2007-11-13 07:06:30 +00:00
Steve Naroff
e50478e0b0
Tune the lookup logic in Sema::ActOnInstanceMessage() to handle private methods (declared within the implementation).
...
llvm-svn: 44041
2007-11-13 04:10:18 +00:00
Steve Naroff
9d0d4dc7bd
Minor indenting changes and removed a level of casting in getClassInterface();
...
llvm-svn: 44039
2007-11-13 01:40:57 +00:00
Fariborz Jahanian
3a9fe93286
Patch to set context (interface, category, etc.) in which method is declared.
...
llvm-svn: 44038
2007-11-13 01:10:08 +00:00
Bill Wendling
f359fed9f9
Unify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stack
...
adjustment fields, and an optional flag. If there is a "dynamic_stackalloc" in
the code, make sure that it's bracketed by CALLSEQ_START and CALLSEQ_END. If
not, then there is the potential for the stack to be changed while the stack's
being used by another instruction (like a call).
This can only result in tears...
llvm-svn: 44037
2007-11-13 00:44:25 +00:00
Steve Naroff
4a158f37f9
Fix Sema::CheckAssignmentConstraints() to operate on the canonical, unqualified type.
...
llvm-svn: 44036
2007-11-13 00:31:42 +00:00
Ted Kremenek
e9b83bbd68
Renamed all serialization "Materialize" methods to "Create" to conform with
...
the new serialization API.
llvm-svn: 44035
2007-11-13 00:25:37 +00:00
Ted Kremenek
e7033b0356
Renamed serialization method "Materialize" to "Create". This is an API change.
...
llvm-svn: 44034
2007-11-13 00:25:08 +00:00
Ted Kremenek
cd51750512
Restructured serialization code for decls to make it cleaner, easier to
...
understand, and batched the emission owned subobjects (using
BatchEmitOwnedPtr) to get a smaller output bitcode size.
llvm-svn: 44033
2007-11-13 00:15:39 +00:00
Ted Kremenek
be0a4b734e
Fixed bug with inconsistent serialization/deserialization in matching
...
calls to BatchEmitOwnedPtrs and BatchReadOwnedPtrs.
llvm-svn: 44032
2007-11-13 00:13:57 +00:00
Bill Wendling
c8f2f68e87
Move SYSCTL stuff close to where it's used.
...
llvm-svn: 44031
2007-11-12 23:55:19 +00:00
Devang Patel
f48ae28600
Build universal llvm.
...
llvm-svn: 44030
2007-11-12 23:53:43 +00:00
Anton Korobeynikov
bfb139ec93
Completely forgot, that we have some debug information emission on PPC. This should fix
...
some regressions on ppc nightly tests.
llvm-svn: 44029
2007-11-12 23:36:13 +00:00
Fariborz Jahanian
21f54eeacf
Patch to do statically typed ivar references.
...
llvm-svn: 44028
2007-11-12 22:29:28 +00:00
Steve Naroff
fedb49771d
Add category method definitions incrementally, removing a FIXME (like we do for class implementations).
...
llvm-svn: 44027
2007-11-12 22:05:31 +00:00
Fariborz Jahanian
2d0d3ba43e
Minor twik for when there is no super class and 'super' is errornously used.
...
llvm-svn: 44026
2007-11-12 20:20:37 +00:00
Fariborz Jahanian
d98a734bd6
'super' nailed.
...
llvm-svn: 44025
2007-11-12 20:13:27 +00:00
Bruno Cardoso Lopes
b439132d16
Added JumpTable support
...
Fixed some AsmPrinter issues
Added GLOBAL_OFFSET_TABLE Node handle.
llvm-svn: 44024
2007-11-12 19:49:57 +00:00
Steve Naroff
040f696bfc
Fix regression to Sema::ObjcActOnStartOfMethodDef()...need to initialize InvalidType field to false.
...
llvm-svn: 44023
2007-11-12 19:48:27 +00:00
Steve Naroff
cd002f5a0e
Add an error diagnostic to Parse::ParseObjCMessageExpression().
...
This now exposes the following bug...
******************** TEST 'Sema/message.m' FAILED! ********************
Command:
clang -fsyntax-only -verify Sema/message.m
Output:
Errors seen but not expected:
Line 9: invalid receiver to message expression
******************** TEST 'Sema/message.m' FAILED! ********************
As far as I can tell, all messages to method agruments fail.
The method arguments are built by Sema::ObjcActOnStartOfMethodDef().
llvm-svn: 44022
2007-11-12 19:18:37 +00:00
Ted Kremenek
e33ba16368
Added versions of ReadPtr that takes an explicit SerializedPtrID. This allows
...
clients of the Deserializer to read the pointer ID before they are ready
to deserialize the object (which can mean registering a pointer reference
with the backpatcher).
Changed some methods that took an argument "SerializedPtrID" to "const SerializedPtrID&" (pass-by-reference). This is to accommodate a future
revision of SerializedPtrID where it may be much fatter than an unsigned
integer.
llvm-svn: 44021
2007-11-12 19:11:15 +00:00
Ted Kremenek
0035bf33c4
In Stmt serialization, renamed directEmit to EmitImpl and
...
directMaterialize to CreateImpl.
llvm-svn: 44020
2007-11-12 18:04:32 +00:00
Owen Anderson
c520c4b325
Break critical edges coming into blocks with PHI nodes.
...
llvm-svn: 44019
2007-11-12 17:27:27 +00:00
Steve Naroff
b342361c0d
Now that we can refer to instance variables, make sure they are considered lvalues.
...
llvm-svn: 44017
2007-11-12 14:34:27 +00:00
Steve Naroff
e46504b278
Implement instance variable references.
...
llvm-svn: 44016
2007-11-12 14:29:37 +00:00
Steve Naroff
e3d1ab29da
- Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();
...
- Add Sema::CurMethodDecl, in preparation for adding ObjcIvarRefExpr.
- Add ObjcInterfaceDecl::lookupInstanceVariable(), in prep for adding ivars.
- A couple renames in ObjcInterfaceDecl, while I was in the vicinity:-)
llvm-svn: 44015
2007-11-12 13:56:41 +00:00
Gordon Henriksen
1ced282c73
Typo fix in the tutorial.
...
llvm-svn: 44014
2007-11-12 13:46:21 +00:00
Duncan Sands
5dc0c9282f
Compile fix.
...
llvm-svn: 44013
2007-11-12 13:43:23 +00:00
Owen Anderson
933b5b7e62
Add a flag for indirect branch instructions.
...
Target maintainers: please check that the instructions for your target are correctly marked.
llvm-svn: 44012
2007-11-12 07:39:39 +00:00
Evan Cheng
be51f28e2b
Refactor some code.
...
llvm-svn: 44010
2007-11-12 06:35:08 +00:00
Steve Naroff
8e5c112add
Forgot this file from my last commit...
...
llvm-svn: 44009
2007-11-12 05:02:46 +00:00
Steve Naroff
ff4dbff4f4
Remove Action::ObjcActOnMethodDefinition(). Rationale:
...
- It is not an "action" - it is never called by the parser.
- It was only used by one method, Sema::ObjcActOnStartOfMethodDef().
As a result, the logic it embodied is now directly implemented in Sema::ObjcActOnStartOfMethodDef().
llvm-svn: 44008
2007-11-12 04:59:00 +00:00
Steve Naroff
3434bebec9
Make sure @property is allowed within a category.
...
Bug submitted by Keith Bauer.
CookieJar:Desktop keith$ cat test.m
#import <WebKit/WebKit.h>
llvm-svn: 44007
2007-11-12 04:22:52 +00:00
Steve Naroff
d0bf516e70
Remove Sema::ObjcBuildMethodParameter().
...
Modify Sema::ParseParamDeclarator() to work for both ActOnStartOfFunctionDef() and ObjcActOnStartOfMethodDef().
llvm-svn: 44006
2007-11-12 03:44:46 +00:00
Owen Anderson
556fb3467b
Fix rewriting of PHI nodes.
...
Could someone more familiar with machine-level stuff review this for me?
llvm-svn: 44005
2007-11-12 02:13:07 +00:00
Hartmut Kaiser
28af9f7d00
Updated VC++ build system
...
llvm-svn: 44004
2007-11-12 01:24:50 +00:00
Owen Anderson
f66f0d619a
Remove unnecessary #include's.
...
llvm-svn: 44003
2007-11-12 01:19:28 +00:00
Owen Anderson
a1cd45213d
As Chris and Evan pointed out, BreakCriticalMachineEdges doesn't really need
...
to be a pass of its own. Instead, move it out into a helper method.
llvm-svn: 44002
2007-11-12 01:05:09 +00:00
Owen Anderson
55f4e5d2dd
Fix on 64-bit machines.
...
llvm-svn: 44001
2007-11-12 00:56:04 +00:00
Steve Naroff
b313fc3203
Replace 2 method definition actions (ActOnFunctionDefBody, ActOnMethodDefBody) with 1 method definition action (ActOnFinishFunctionBody). I can't think of any reason that we would need two action hooks.
...
llvm-svn: 44000
2007-11-11 23:20:51 +00:00
Steve Naroff
bb87572d70
Replace 3 method definition functions (ObjcParseMethodDefinition, ParseObjCInstanceMethodDefinition, ParseObjCClassMethodDefinition) with 1 method definition function (ParseObjCMethodDefinition).
...
Less code/confusion.
llvm-svn: 43999
2007-11-11 19:54:21 +00:00
Anton Korobeynikov
0644bb865e
Clarify the meaning of '-2' register number
...
llvm-svn: 43998
2007-11-11 19:53:50 +00:00
Anton Korobeynikov
4edfea438a
Use TableGen to emit information for dwarf register numbers.
...
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,
llvm-svn: 43997
2007-11-11 19:50:10 +00:00
Steve Naroff
49effdefef
Tweak Sema::ActOnInstanceMessage() to treat the built-in "Class" type the same as "id".
...
llvm-svn: 43996
2007-11-11 17:52:25 +00:00
Steve Naroff
cac26f4f5f
This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() about private methods (r43989).
...
While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end).
Other details...
- Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments.
- Removed Parser::AllImplMethods (a nice cleanup).
- Added location info to ObjcImplementationDecl (since we will need it very soon:-)
- Modified message.m test to no longer allow the bogus diagnostic.
llvm-svn: 43995
2007-11-11 17:19:15 +00:00
Steve Naroff
5f9ae64f6e
Make sure Sema::CheckIncrementDecrementOperand() removes typedefs when doing it's analysis.
...
Thanks to Seo Sanghyeon for his excellent (first) bug fix!
llvm-svn: 43994
2007-11-11 14:15:57 +00:00
Anton Korobeynikov
a468a11d80
Add convenient helper to obtain list of ints
...
llvm-svn: 43993
2007-11-11 11:19:37 +00:00
Steve Naroff
22e078e013
Teach Sema::ActOnInstanceMessage() about private methods. That is, methods declared in an implementation (but not listed in the interface).
...
This commit is only 95% of the bug fix. The last piece to this puzzle is to add the method decls to the implementation incrementally (as we encounter them). At the moment, the methods aren't added until we see an @end (which is too late).
I will complete this later...
llvm-svn: 43989
2007-11-11 00:10:47 +00:00
Dale Johannesen
b988e7e8cd
Add CCAssignToStackABISizeAlign for convenience in
...
dealing with types whose size & alignment are
different on different subtargets. Use it for x86 f80.
llvm-svn: 43988
2007-11-10 22:07:15 +00:00
Fariborz Jahanian
0bd56b7727
Fixed a bug which exposed the internally built type to user code.
...
llvm-svn: 43987
2007-11-10 22:00:55 +00:00
Fariborz Jahanian
16e3123071
pretty priting for method definitions.
...
llvm-svn: 43986
2007-11-10 20:59:13 +00:00
Steve Naroff
257b4a2467
Fix a basic bug (having to do with typedefs) in Sema::UsualArithmeticConversions().
...
This resuled in the following crash below.
Also modified the usual-float.c test case to capture this case.
[steve-naroffs-imac:clang/test/Sema] snaroff% ../../../../Debug/bin/clang usual-float.c
Assertion failed: (0 && "Sema::UsualArithmeticConversions(): illegal float comparison"), function UsualArithmeticConversions, file SemaExpr.cpp, line 960.
0 clang 0x001ef9b9 _ZN40_GLOBAL__N_Signals.cpp_00000000_4E6DAF8315PrintStackTraceEv + 45
1 clang 0x001efd5f _ZN40_GLOBAL__N_Signals.cpp_00000000_4E6DAF8313SignalHandlerEi + 323
2 libSystem.B.dylib 0x90c6297b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libSystem.B.dylib 0x90cdb782 raise + 26
5 libSystem.B.dylib 0x90cead3f abort + 73
6 libSystem.B.dylib 0x90cdc923 __assert_rtn + 101
7 clang 0x00077316 _ZN5clang4Sema26UsualArithmeticConversionsERPNS_4ExprES3_b + 1004
8 clang 0x000803cf _ZN5clang4Sema27CheckMultiplyDivideOperandsERPNS_4ExprES3_NS_14SourceLocationEb + 181
9 clang 0x0007a8e8 _ZN5clang4Sema10ActOnBinOpENS_14SourceLocationENS_3tok9TokenKindEPvS4_ + 472
10 clang 0x000cf058 _ZN5clang6Parser26ParseRHSOfBinaryExpressionENS_6Action12ActionResultILj0EEEj + 1286
11 clang 0x000cf2de _ZN5clang6Parser25ParseAssignmentExpressionEv + 86
llvm-svn: 43985
2007-11-10 19:45:54 +00:00
Ted Kremenek
b0cdfeb4ba
Fixed a bug introduced by my last patch. Now we properly clear out the BatchIDVec
...
vector before reusing it.
llvm-svn: 43984
2007-11-10 19:33:26 +00:00
Ted Kremenek
cdf5fca367
Fixed hack in BatchReadOwnedPtrs to no longer use the array of pointers passed in for
...
deserialization as a temporary location for storing serialized pointer identifiers. The
definition of SerializedPtrID will likely change significantly in the future, and the
current implementation caused compilation errors on some 64-bit machines.
llvm-svn: 43983
2007-11-10 19:28:49 +00:00
Ted Kremenek
195c478e1b
Updated method signature to conform with the typedef in the method prototype.
...
llvm-svn: 43982
2007-11-10 19:19:32 +00:00
Steve Naroff
68754c59bc
Since we are all working on Leopard, change the built-in MacOS X version number (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) to target Leopard. This is only a short term solution, until the clang driver implements the "-mmacosx-version-min" flag (which will compute this value based on the target).
...
llvm-svn: 43981
2007-11-10 18:06:36 +00:00
Fariborz Jahanian
6aafd4130b
Minor code clean up in method def area.
...
llvm-svn: 43980
2007-11-10 17:40:57 +00:00
Fariborz Jahanian
85e1d0d807
Represent method definitions as separate AST nodes. Pretty print will come next.
...
llvm-svn: 43979
2007-11-10 16:31:34 +00:00
Arnold Schwaighofer
d2c16ff905
Update tailcall code to include inline attribute operand for memcpy.
...
llvm-svn: 43978
2007-11-10 10:48:01 +00:00
Ted Kremenek
739156ab7c
Changed the serialization of IdentifierTable to only serialize out entries
...
that are referenced in the ASTs. This assumes that we serialize out the
decls/stmts first, and use the pointer-tracking logic in the Serializer to
determine if an IdentifierInfo (or its string key) is ever referenced.
This is a significant space optimization for serialized ASTs.
Consider the following program:
void foo(int x,int y) {
return x > y ? x : y+1;
}
Here are the sizes of the files for the serialized ASTs:
Full IdentifierTable: 23676 bytes
Only-referenced Identifiers: 304 bytes.
For this simple program, this is a 77% reduction in the file size of the
serialized ASTs.
llvm-svn: 43975
2007-11-10 02:11:55 +00:00
Ted Kremenek
11d700bfba
Modifed the test serialization driver to...
...
(1) serialize out top-level decls BEFORE serializing out translation unit
structures like ASTContext.
(2) deserialize out translation unit structures like ASTContext before
top-level decls by first skipping the decls in the bitstream, deserializing
ASTContext and friends, and then jumping back to the bitstream block with the
decls and then deserializing them.
Change (1) allows us to utilize the pointer-tracking system in the Serializer
to only serialize out metadata that is actually referenced by the ASTS.
Change (2) allows us to deserialize the metadata first as before, which
signficantly reduces the amount of pointer backpatching the deserializer
would have to do if the decls were deserialized first.
llvm-svn: 43974
2007-11-10 02:07:12 +00:00
Ted Kremenek
55e30be8ec
Added "random access" to the Deserializer to allow a client to jump to any
...
serialized block in the bitstream, including a block in an entirely different
nesting than the current block. This is useful for deserializing objects from
a bitstream in an order different from the order that they were serialized.
llvm-svn: 43973
2007-11-10 02:02:34 +00:00
Ted Kremenek
a7f49ce570
Made Deserializer a friend class of BitstreamReader.
...
Moved some of the logic in BitstreamReader::ExitBlock into a utility function
BitstreamReader::PopBlockScope. The latter is a private method. It will also
be called by Deserializer to manipulate the current "block scope."
llvm-svn: 43972
2007-11-10 02:00:38 +00:00
Evan Cheng
9e0216deab
Added -test-opts to specify test options.
...
llvm-svn: 43971
2007-11-10 01:33:27 +00:00
Chris Lattner
ef067a2828
rename getInstantiationLoc to match the scheme of isPhysicalLoc.
...
llvm-svn: 43969
2007-11-09 23:59:17 +00:00
Chris Lattner
198b3e085d
change source location to have two bits for macros, tracking
...
whether the location is the start and/or end of an expansion.
These are currently not set or used by anything.
llvm-svn: 43968
2007-11-09 23:52:16 +00:00
Fariborz Jahanian
7a017215eb
Some code clean up in the form of name changes for functions which
...
process method definitions.
llvm-svn: 43967
2007-11-09 22:27:59 +00:00
Chris Lattner
f9f08bf4b0
Update links.
...
llvm-svn: 43964
2007-11-09 21:49:08 +00:00
Evan Cheng
05b94b8c13
Fix tests.
...
llvm-svn: 43961
2007-11-09 20:46:00 +00:00
Hartmut Kaiser
67297144ab
Fixed a strange construct. Please review.
...
llvm-svn: 43960
2007-11-09 19:59:00 +00:00
Hartmut Kaiser
76886e1875
Updated VC++ build system
...
llvm-svn: 43959
2007-11-09 19:54:59 +00:00
Hartmut Kaiser
03f4d47254
Updated VC++ build system
...
llvm-svn: 43958
2007-11-09 19:53:21 +00:00
Fariborz Jahanian
b5605179c4
Added class context to method declarations. Provide "interface *" type
...
to 'self' method of instance methods.
llvm-svn: 43957
2007-11-09 19:52:12 +00:00
Chris Lattner
da043b68ad
try again
...
llvm-svn: 43956
2007-11-09 19:24:54 +00:00
Evan Cheng
fb13fd6f93
Unbreak x86-64 jumptable.
...
llvm-svn: 43955
2007-11-09 19:11:23 +00:00
Anton Korobeynikov
5db5e352b9
Silence a warning
...
llvm-svn: 43954
2007-11-09 19:06:14 +00:00
Dale Johannesen
dfb85c7831
Revert previous rewrite per chris's comments.
...
llvm-svn: 43950
2007-11-09 18:07:11 +00:00
Chris Lattner
f9c0fd7488
Tighten up a check for folding away loads from (newly constant) globals. This
...
fixes a crash on Transforms/GlobalOpt/2007-11-09-GEP-GEP-Crash.ll and
rdar://5585488.
llvm-svn: 43949
2007-11-09 17:33:02 +00:00
Fariborz Jahanian
19d4dbd217
Insert invisble arguments to method definition header.
...
llvm-svn: 43948
2007-11-09 17:18:29 +00:00
Steve Naroff
2011338446
Rewrite global variable initializers.
...
llvm-svn: 43947
2007-11-09 15:20:18 +00:00
Steve Naroff
8570fdec1a
Recognize ObjCStringLiteral as a constant expression.
...
llvm-svn: 43946
2007-11-09 15:00:03 +00:00
Duncan Sands
303a5d6c8b
Thanks to the XTARGET line, this test should still
...
be run on darwin, but I have no way of checking...
llvm-svn: 43945
2007-11-09 13:50:25 +00:00
Duncan Sands
e795efea5b
Move MinAlign to MathExtras.h.
...
llvm-svn: 43944
2007-11-09 13:41:39 +00:00
Steve Naroff
1b232132ad
- add typedef guards.
...
- tweak scanForProtocolRefs heuristic.
- disable RewriteInclude() for now.
llvm-svn: 43942
2007-11-09 12:50:28 +00:00
Anton Korobeynikov
550b98e147
Fix indent
...
llvm-svn: 43941
2007-11-09 12:34:20 +00:00
Anton Korobeynikov
98638aede6
Forget to commit users part of value mapper interface
...
llvm-svn: 43940
2007-11-09 12:27:04 +00:00
Anton Korobeynikov
8eeca1c252
And delete this one
...
llvm-svn: 43939
2007-11-09 12:22:04 +00:00
Anton Korobeynikov
7a96822f32
Make this header public
...
llvm-svn: 43938
2007-11-09 12:16:58 +00:00
Duncan Sands
e7a9ac929f
Fix some load/store logic that would be wrong for
...
apints on big-endian machines if the bitwidth is
not a multiple of 8. Introduce a new helper,
MVT::getStoreSizeInBits, and use it.
llvm-svn: 43934
2007-11-09 08:57:19 +00:00
Duncan Sands
bab9dc9433
Add terminating newline.
...
llvm-svn: 43933
2007-11-09 08:30:21 +00:00
Duncan Sands
0c7fba914d
Check that the first and third characters, s and u,
...
are accessed with an alignment of 2 not 1.
llvm-svn: 43932
2007-11-09 07:47:29 +00:00
Duncan Sands
1445725759
Check that accesses to the second short, t, have
...
an alignment of 2 rather than 4.
llvm-svn: 43931
2007-11-09 07:46:02 +00:00
Bill Wendling
71df1dd59e
Initial commit of files that support building LLVM the "Apple" way.
...
llvm-svn: 43929
2007-11-09 06:59:33 +00:00
Nick Lewycky
70248c92cf
Add a link to the tutorial.
...
llvm-svn: 43928
2007-11-09 05:45:51 +00:00
Evan Cheng
797d56ff17
Much improved pic jumptable codegen:
...
Then:
call "L1$pb"
"L1$pb":
popl %eax
...
LBB1_1: # entry
imull $4, %ecx, %ecx
leal LJTI1_0-"L1$pb"(%eax), %edx
addl LJTI1_0-"L1$pb"(%ecx,%eax), %edx
jmpl *%edx
.align 2
.set L1_0_set_3,LBB1_3-LJTI1_0
.set L1_0_set_2,LBB1_2-LJTI1_0
.set L1_0_set_5,LBB1_5-LJTI1_0
.set L1_0_set_4,LBB1_4-LJTI1_0
LJTI1_0:
.long L1_0_set_3
.long L1_0_set_2
Now:
call "L1$pb"
"L1$pb":
popl %eax
...
LBB1_1: # entry
addl LJTI1_0-"L1$pb"(%eax,%ecx,4), %eax
jmpl *%eax
.align 2
.set L1_0_set_3,LBB1_3-"L1$pb"
.set L1_0_set_2,LBB1_2-"L1$pb"
.set L1_0_set_5,LBB1_5-"L1$pb"
.set L1_0_set_4,LBB1_4-"L1$pb"
LJTI1_0:
.long L1_0_set_3
.long L1_0_set_2
llvm-svn: 43924
2007-11-09 01:32:10 +00:00
Evan Cheng
f14006f4d6
Didn't mean to check these in.
...
llvm-svn: 43923
2007-11-09 01:28:33 +00:00
Evan Cheng
1bf166312b
Bug fix. Passive nodes are not in SUnitMap.
...
llvm-svn: 43922
2007-11-09 01:27:11 +00:00
Chuck Rose III
0e7937654c
Adding some recently added files to the VStudio projects
...
llvm-svn: 43919
2007-11-09 00:48:27 +00:00
Dale Johannesen
04fd82088e
Rewrite Dwarf number handling per review comments.
...
llvm-svn: 43918
2007-11-09 00:47:10 +00:00
Ted Kremenek
908f96a2cf
Changed method call to reflect updated serialization API.
...
llvm-svn: 43917
2007-11-09 00:43:55 +00:00
Ted Kremenek
1d9406c1ca
Updated Deserializer class to provide more information about the current
...
block that is being visited in the bitstream. The client can also now
skip blocks before reading them, and query the current abbreviation number
as seen from the perspective of the Deserializer. This allows the client
to be more interactive in the deserialization process (if they so choose).
llvm-svn: 43916
2007-11-09 00:43:51 +00:00
Fariborz Jahanian
56ff146ec4
First patch toward rewriting of method definitions. This is work in progress.
...
llvm-svn: 43915
2007-11-08 23:49:49 +00:00
Devang Patel
94785aa1c7
Run this test only on darwin.
...
llvm-svn: 43912
2007-11-08 22:26:46 +00:00
Owen Anderson
65d2fcdd2a
This preserves critical edge breaking.
...
llvm-svn: 43911
2007-11-08 22:23:57 +00:00
Owen Anderson
3bc8124a66
Make BreakCriticalMachineEdges available as a pass that can be depended on.
...
llvm-svn: 43910
2007-11-08 22:20:23 +00:00
Chris Lattner
f546408406
remove some temporary code.
...
llvm-svn: 43906
2007-11-08 20:53:07 +00:00
Chris Lattner
b74f6e82e4
add a getAtOffset() member to simplify some code.
...
llvm-svn: 43905
2007-11-08 20:51:02 +00:00
Ted Kremenek
da4c6c183d
Rewrote serialization of IdentifierInfo and IdentifierTable to use methods Emit
...
and Materialize/Read instead of using specializations of SerializeTrait<>. The
resulting code is much cleaner. We are also setting the stage so that only the
parts of the IdentifierTable that are ever referenced within the ASTs are
serialized, and not the whole table.
llvm-svn: 43904
2007-11-08 19:52:41 +00:00
Ted Kremenek
67135ebaff
Added typedef "SerializedPtrID" to represent the pointer handle written to disk
...
instead of just using "unsigned". This gives us more flexibility in changing
the definition of the handle later, and is more self-documenting.
Added tracking of block stack in the Deserializer. Now clients can query
if they are still within a block using the methods GetCurrentBlockLocation()
and FinishedBlock().
llvm-svn: 43903
2007-11-08 19:50:46 +00:00
Chris Lattner
34660fb75a
add a fixme.
...
llvm-svn: 43902
2007-11-08 19:40:23 +00:00
Chris Lattner
bedd411589
significantly simplify the implementation of RewriteRope by changing the
...
implementation to be list<RopePiece> instead of vector<RopePiece*>.
llvm-svn: 43901
2007-11-08 19:39:57 +00:00
Fariborz Jahanian
8e632940fc
Refactored parsing of main function body for reuse by objective-c methods.
...
llvm-svn: 43898
2007-11-08 19:01:26 +00:00
Andrew Lenharth
19ca5c7021
Better check
...
llvm-svn: 43897
2007-11-08 18:45:15 +00:00
Chris Lattner
3eb670721f
improve MakeRopeString to avoid doing a malloc for every 2-character string
...
that gets inserted. This speeds up the rewriter another 10%.
llvm-svn: 43896
2007-11-08 18:32:01 +00:00
Chris Lattner
9a00d3ec90
Simplify interface to MakeRopeString.
...
llvm-svn: 43895
2007-11-08 17:59:48 +00:00
Chris Lattner
3a21bd50e7
Fix backwards assert.
...
llvm-svn: 43894
2007-11-08 17:56:40 +00:00
Andrew Lenharth
8cf11aa330
Fix PR1780
...
llvm-svn: 43893
2007-11-08 17:39:28 +00:00
Lauro Ramos Venancio
f6a67bf700
[ARM] Implement __builtin_thread_pointer.
...
llvm-svn: 43892
2007-11-08 17:20:05 +00:00
Ted Kremenek
f2d68452c6
Implemented serialization of AddrLabelExpr.
...
Implemented serialization of ConditionalOperator.
Implemented serialization of StmtExpr.
Fixed bug in serialization of IndirectGoto (did not properly serialize subexpression).
llvm-svn: 43891
2007-11-08 16:32:00 +00:00
Steve Naroff
265a6b9693
Rewrite RewriteObjCStringLiteral(). This version is simpler (and unlike the previous one, works:-)
...
llvm-svn: 43890
2007-11-08 14:30:50 +00:00
Evan Cheng
ece4c68b82
If both parts of smul_lohi, etc. are used, don't simplify. If only one part is used, try simplify it.
...
llvm-svn: 43888
2007-11-08 09:25:29 +00:00
Owen Anderson
0be8c1dafe
Add the majority of machine-level critical edge breaking pass. Most of this was written by Fernando, cleanup and updating to TOT by me.
...
This still needs a bit of work, particularly to handle jump tables properly.
llvm-svn: 43885
2007-11-08 07:55:43 +00:00
Chris Lattner
e90ce8def3
Add a new RewriteRope data structure which is a smarter way to represent the text
...
backing a rewrite buffer than using an std::vector<char>. This class was hacked
together very quickly and needs to be cleaned up, but it seems to work. It speeds
up rewriting a a 7M file from 6.43s to 0.24s on my machine. The impl could also
be made to be a lot more algorithmically sound.
This produces identical output to using vector on this testcase, if it causes a
problems or bugs are encountered, it can be disabled by changing the
RewriteBuffer::Buffer typedef back.
llvm-svn: 43884
2007-11-08 07:35:14 +00:00
Chris Lattner
7a7da75916
abstract out buffer type a bit better
...
llvm-svn: 43883
2007-11-08 05:42:25 +00:00
Chris Lattner
dc0cfc9fe3
use insert instead of replacing 0 bytes with text :)
...
llvm-svn: 43882
2007-11-08 04:41:51 +00:00
Chris Lattner
edebdb5b29
minor cleanups
...
llvm-svn: 43881
2007-11-08 04:41:04 +00:00
Chris Lattner
9fd5890e52
use std::copy instead of memcpy for abstraction.
...
Disable rewrite-tabs. This speeds up processing of the commentified huge
crazy testcase steve gave me from 20s to 6.6s in a release build.
llvm-svn: 43880
2007-11-08 04:27:23 +00:00
Chris Lattner
4573cc708a
Fix a rewriter bug that fariborz hit, when an @interface was the very very very
...
first thing in the file.
The trick is that text replacement should go after the insert point,
not before it, because it will be replacing text after the point, not before
it.
llvm-svn: 43879
2007-11-08 04:09:59 +00:00
Owen Anderson
bfbc12973d
Take another stab at getting isLiveIn() and isLiveOut() right.
...
llvm-svn: 43869
2007-11-08 01:32:45 +00:00
Owen Anderson
4ac4ec215f
Fix MachineDominators' getAnalysisUsage.
...
llvm-svn: 43868
2007-11-08 01:22:53 +00:00
Owen Anderson
17296e74b1
Oops, forgot to commit this file.
...
llvm-svn: 43867
2007-11-08 01:22:24 +00:00
Owen Anderson
9d86ef12c8
Bring UsedBlocks back. StrongPHIElimination needs this information.
...
llvm-svn: 43866
2007-11-08 01:20:48 +00:00
Ted Kremenek
a34b057762
Revised serialization of CaseStmt to emit all of the owned pointers (its
...
subexpressions) all together in one block at the end.
llvm-svn: 43862
2007-11-08 00:56:26 +00:00
Ted Kremenek
89704afa43
Revised BatchEmitOwnedPtrs to work better with constant pointers.
...
llvm-svn: 43861
2007-11-08 00:55:31 +00:00
Ted Kremenek
c1cddef7c9
Implemented serialization of CompoundAssignOperator.
...
llvm-svn: 43860
2007-11-08 00:41:37 +00:00
Devang Patel
ec51171319
Add assert for the case that is not handled.
...
struct { char a; short b:2; };
llvm-svn: 43859
2007-11-08 00:32:12 +00:00
Ted Kremenek
2419ac8792
Implemented serialization of UnaryOperator.
...
llvm-svn: 43858
2007-11-08 00:26:24 +00:00
Devang Patel
7c7a07d949
Keep track of beginning offset for the bit field that does not start at byte boundry.
...
llvm-svn: 43857
2007-11-08 00:17:59 +00:00
Ted Kremenek
8f74abd34a
Revised implementation of BatchReadOwnedPtrs() that deserializes an
...
array of pointers to not allocate a second array to contain the pointer ids.
Fixed bug in the same member function where deserialized pointers were
not being registered with the backpatcher.
llvm-svn: 43855
2007-11-08 00:04:50 +00:00
Ted Kremenek
766fc8c14a
Implemented serialization of CallExpr.
...
llvm-svn: 43854
2007-11-07 23:32:20 +00:00
Ted Kremenek
14b5fe537e
Fixed bug where we did not properly serialize owned objects due to a missing
...
dereference.
llvm-svn: 43853
2007-11-07 23:32:06 +00:00
Ted Kremenek
1125bfa648
Added version of BatchEmitOwnedPtrs and BatchReadOwnedPtrs that emits/reads
...
an array of pointers of the same type.
llvm-svn: 43852
2007-11-07 23:18:40 +00:00
Ted Kremenek
2c325386b8
Implemented serialization of ArraySubscriptExpr.
...
Added "using ..." for "Serializer" and "Deserializer" to reduce amount
of typing for serialization methods.
llvm-svn: 43849
2007-11-07 22:53:01 +00:00
Ted Kremenek
e87ceeeb4a
Implemented serialization of CastExpr.
...
llvm-svn: 43848
2007-11-07 22:42:34 +00:00
Ted Kremenek
b2b5e73f89
Implemented serialization of ImplicitCastExpr.
...
llvm-svn: 43847
2007-11-07 22:39:17 +00:00
Ted Kremenek
9d2bf704de
Modified serialization of BinaryOperator and CaseStmt to use the new
...
BatchEmitOwnedPtrs() and BatchReadOwnedPtrs() methods.
Modified serialization of all Stmts to start their own record in the bitstream.
llvm-svn: 43846
2007-11-07 22:32:23 +00:00
Ted Kremenek
e079cb7b08
Added methods to batch emit and deserialize owned pointers. This allows
...
to group the pointer IDs together in the bitstream before their referenced
contents (which will lend itself to more efficient encoding).
llvm-svn: 43845
2007-11-07 22:30:29 +00:00
Dale Johannesen
1b9de4dd6f
Complete conditionalization of Dwarf reg numbers.
...
Would somebody not on Darwin please make sure this
doesn't break anything. Exception handling failures
would be the most likely symptom.
llvm-svn: 43844
2007-11-07 21:48:35 +00:00
Devang Patel
ef2d838fef
Stay within 80 columns.
...
llvm-svn: 43843
2007-11-07 21:04:59 +00:00
Bill Wendling
6e976915a3
Add testcase
...
llvm-svn: 43839
2007-11-07 19:36:26 +00:00
Hartmut Kaiser
abcbb0493a
Updated VC++ build system
...
llvm-svn: 43838
2007-11-07 19:34:40 +00:00
Hartmut Kaiser
b1d7cb2938
Updated VC++ build system
...
llvm-svn: 43837
2007-11-07 19:34:09 +00:00
Hartmut Kaiser
b964f650c9
Fixed compilation errors on VC++.
...
llvm-svn: 43836
2007-11-07 19:33:31 +00:00
Ted Kremenek
d68db575f3
Implemented serialization of StringLiteral.
...
llvm-svn: 43834
2007-11-07 19:08:19 +00:00
Ted Kremenek
f9062be688
Implemented serialization of ImaginaryLiteral.
...
llvm-svn: 43833
2007-11-07 18:53:02 +00:00
Ted Kremenek
569725f827
Implemented serialization of FloatingLiteral.
...
llvm-svn: 43832
2007-11-07 18:45:55 +00:00
Steve Naroff
1601858de5
Finishing touches on code generation for @try and friends.
...
- declare functions we use.
- cast arguments to objc_exception_match().
- don't take the & of _stack.buf.
llvm-svn: 43831
2007-11-07 18:43:40 +00:00
Fariborz Jahanian
1299a92327
Emit objective-c's meta-data at the end of rewriting to stdout.
...
llvm-svn: 43830
2007-11-07 18:40:28 +00:00
Ted Kremenek
81ad944c94
Implemented generic serialization of APFloat.
...
llvm-svn: 43829
2007-11-07 18:39:22 +00:00
Ted Kremenek
cc88d37531
Implemented serialization of signed integers.
...
llvm-svn: 43828
2007-11-07 18:24:34 +00:00
Steve Naroff
b7a032eb20
Remove old asserts from ASTContext::isObjcIdType() and isObjcClassType(). Instead, return false if the declarations aren't in scope. This was a hold over from when 'id' and 'Class' were initialized lazily.
...
llvm-svn: 43827
2007-11-07 18:07:59 +00:00
Fariborz Jahanian
8a348705a8
Fixed an array overflow bug.
...
llvm-svn: 43826
2007-11-07 17:43:16 +00:00
Fariborz Jahanian
e044087b56
Fixed typo.
...
llvm-svn: 43825
2007-11-07 17:29:15 +00:00
Ted Kremenek
c874c6a959
Implemented serialization of CharacterLiteral.
...
llvm-svn: 43824
2007-11-07 17:15:49 +00:00
Ted Kremenek
3c58662411
Implemented serialiation of PreDefinedExpr.
...
llvm-svn: 43823
2007-11-07 17:11:58 +00:00
Ted Kremenek
d47c8125a1
Implemented serialization of ContinueStmt.
...
llvm-svn: 43822
2007-11-07 17:05:07 +00:00
Ted Kremenek
3b4c08deae
Implemented serialization of IndirectGotoStmt.
...
Added "FIXME" regarding the lack of source location information for IndirectGotoStmt.
llvm-svn: 43821
2007-11-07 17:02:32 +00:00
Steve Naroff
a733c7ffe4
Implement rewrite for @throw.
...
llvm-svn: 43820
2007-11-07 15:32:26 +00:00
Evan Cheng
e742ee1dbe
Simplify my (il)logic.
...
llvm-svn: 43819
2007-11-07 08:08:25 +00:00
Ted Kremenek
5fd3040c57
Implemented serialization of GotoStmt.
...
llvm-svn: 43818
2007-11-07 08:07:46 +00:00
Ted Kremenek
35e20410aa
Implemented serialization for ForStmt.
...
llvm-svn: 43817
2007-11-07 08:02:55 +00:00
Ted Kremenek
83e96b8d5a
Implemented serialization of DoStmt.
...
llvm-svn: 43816
2007-11-07 07:53:55 +00:00
Ted Kremenek
f6d8ce1052
Implemented serialization for WhileStmt.
...
llvm-svn: 43815
2007-11-07 07:50:10 +00:00
Ted Kremenek
154c790538
Implemented serialization of IfStmt.
...
Fixed declarations of several "directEmit" methods of classes that subclass
Stmt that were missing a "virtual" keyword.
llvm-svn: 43814
2007-11-07 07:19:30 +00:00
Chris Lattner
4df68cf26a
minor edit
...
llvm-svn: 43813
2007-11-07 07:07:55 +00:00
Chris Lattner
23dea1ef07
final edits.
...
llvm-svn: 43812
2007-11-07 06:46:51 +00:00
Chris Lattner
0903ac4837
chapter 7 edits
...
llvm-svn: 43811
2007-11-07 06:34:39 +00:00
Chris Lattner
d80488f0df
edits for chapter 7
...
llvm-svn: 43810
2007-11-07 06:06:38 +00:00
Steve Naroff
4d7b367652
Teach ASTContext::tagTypesAreCompatible() about the built-in ObjC types (Class and id), removing a bogus warning.
...
llvm-svn: 43809
2007-11-07 06:03:51 +00:00
Chris Lattner
60ba5ef387
edits for chapter 5
...
llvm-svn: 43808
2007-11-07 05:47:48 +00:00
Chris Lattner
b2145a86f7
minor edits
...
llvm-svn: 43807
2007-11-07 05:28:43 +00:00
Ted Kremenek
acb9bcf22a
Implemented serialization of SwitchStmt, CaseStmt, BreakStmt, DefaultStmt,
...
and ParenExpr.
llvm-svn: 43806
2007-11-07 05:25:31 +00:00
Owen Anderson
c6a5387d09
Add some more of StrongPHIElim.
...
llvm-svn: 43805
2007-11-07 05:17:15 +00:00
Chris Lattner
30f1db1ad9
edits.
...
llvm-svn: 43804
2007-11-07 05:07:10 +00:00
Steve Naroff
bf478ece48
Rewrite ObjC @try/@catch/@finally. Some minor tweaks to the AST nodes...
...
Still need to rewrite @throw (and do more testing)...
llvm-svn: 43803
2007-11-07 04:08:17 +00:00
Fariborz Jahanian
adfbbc3330
AST for objective-c's @throw statement and its pretty-printing.
...
llvm-svn: 43802
2007-11-07 02:00:49 +00:00
Devang Patel
b1ecfc6e25
Start struct bit field laout work.
...
This is far from complete.
llvm-svn: 43801
2007-11-07 01:57:13 +00:00
Ted Kremenek
a8cdf31aa0
Implemented serialization of LabelStmts.
...
llvm-svn: 43800
2007-11-07 00:48:04 +00:00
Ted Kremenek
ee4e7d4f25
Added special version of ReadPtr() that returns a deserialized pointer
...
by value. This version prohibits backpatching of pointers, so it
useful when a pointee is always known to be deserialized beforehand.
llvm-svn: 43799
2007-11-07 00:47:33 +00:00
Fariborz Jahanian
defbf9a86c
Fixed a pretty-printer bug whereby a @try statement with no @finally seg faulted.
...
llvm-svn: 43798
2007-11-07 00:46:42 +00:00
Ted Kremenek
ad1bc400d7
Added serialization/deserialization of NullStmts.
...
llvm-svn: 43797
2007-11-07 00:40:53 +00:00
Ted Kremenek
80fe8904e1
Added serialization/deserialization of DeclStmts.
...
Reordered stmt serialization method implementations to be in alphabetical order.
llvm-svn: 43796
2007-11-07 00:37:40 +00:00
Ted Kremenek
5fe293d7bc
Fixed default ctor for APInt to properly initialize BitWidth to a
...
non-random value.
llvm-svn: 43795
2007-11-07 00:27:59 +00:00
Dale Johannesen
fbe69d2cd6
Interchange Dwarf numbers of ESP and EBP on x86 Darwin.
...
Much improvement in exception handling.
llvm-svn: 43794
2007-11-07 00:25:05 +00:00
Ted Kremenek
148aa5edbc
Overhauled serialization of statements. We no longer use specialized SerializeTrait<> classes,
...
but methods in Stmt (like other objects we are serializing). Full serialization of all statements
is not yet complete.
llvm-svn: 43793
2007-11-07 00:17:35 +00:00
Ted Kremenek
abcfe90802
Added static inline method "ReadVal" to QualType for more succinct
...
deserialization code of objects containing QualTypes.
llvm-svn: 43792
2007-11-07 00:13:45 +00:00
Fariborz Jahanian
e8a3016ac7
Rewrite for properties.
...
llvm-svn: 43791
2007-11-07 00:09:37 +00:00
Ted Kremenek
fa2bf434cc
Fixed typo in the name of "ReadPreamble".
...
llvm-svn: 43790
2007-11-06 23:52:19 +00:00
Fariborz Jahanian
bcce2f8d54
Fix an inverted conditional,
...
--chris
llvm-svn: 43789
2007-11-06 23:06:16 +00:00
Tanya Lattner
5de0daf6b1
Implement the XTARGET feature for PR1778
...
This will mark a test as PASS for all targets specified. It will override whatever is in XFAIL.
llvm-svn: 43788
2007-11-06 22:32:17 +00:00
Ted Kremenek
453ab7d126
Started work on new serialization approach within ASTContext to
...
serialize Type objects in the order they are serialized in the Types
vector. We also now rely on the methods within ASTContext to unique
Type objects and handle the actual creation of Type objects (these are
now called by the deserialization code). This approach solves some
hairy issues with ownership of objects and allows us to naturally
handle recursive types.
llvm-svn: 43787
2007-11-06 22:26:16 +00:00
Ted Kremenek
7c91ccae88
QualType deserialization now requires that the underlying pointer type
...
must be deserialized without requiring backpatching.
llvm-svn: 43786
2007-11-06 22:23:53 +00:00
Ted Kremenek
93d446f535
Bug fix: inverted test condition to see if a serialized AST-bitcode
...
file had the correct preamble.
llvm-svn: 43785
2007-11-06 22:23:03 +00:00
Ted Kremenek
bf75685321
Serializer no longer automatically emits a root-level block in the bitstream.
...
llvm-svn: 43784
2007-11-06 22:22:25 +00:00
Ted Kremenek
cd0c32865c
Augmented ReadPtr and ReadOwnedPtr to control whether or not a pointer is allowed to be backpatched
...
or can be registered with the deserializer to backpatch other pointers.
llvm-svn: 43783
2007-11-06 22:21:14 +00:00
Chris Lattner
581f006f5d
make smallptrset more const and type correct, which caught a few
...
minor bugs.
llvm-svn: 43782
2007-11-06 22:12:43 +00:00
Dan Gohman
ccfc028283
Remainder operations must be either integer or floating-point.
...
llvm-svn: 43781
2007-11-06 22:11:54 +00:00
Chris Lattner
8201a9bca0
fix const correctness, BB is const, so its predecessors are too
...
llvm-svn: 43780
2007-11-06 22:07:40 +00:00
Chris Lattner
cbad11e027
don't put erase or query for non-allocainst pointers in an set of allocainsts*'s
...
llvm-svn: 43779
2007-11-06 22:07:22 +00:00
Fariborz Jahanian
f76f2b0c1c
Patch for objc2's property ASTs, as well as pretty-priting the ASTs.
...
llvm-svn: 43778
2007-11-06 22:01:00 +00:00
Chris Lattner
d8515f8e80
Implement PR1777 by detecting dependent phis that
...
all compute the same value.
llvm-svn: 43777
2007-11-06 21:52:06 +00:00
Evan Cheng
dd71a5c37b
When the allocator rewrite a spill register with new virtual register, it replaces other operands of the same register. Watch out for situations where
...
only some of the operands are sub-register uses.
llvm-svn: 43776
2007-11-06 21:12:10 +00:00
Duncan Sands
f042e862fd
At the point of calculating the shift amount, the
...
type of SV has changed from what it originally was.
However we need the store width of the original.
llvm-svn: 43775
2007-11-06 20:39:11 +00:00
Ted Kremenek
77068e17d4
Misc. serialization changes to ASTContext and Decls. Serialization
...
for ASTContext is still rapidly evolving.
llvm-svn: 43774
2007-11-06 19:51:47 +00:00
Ted Kremenek
3a68de993a
Revampled Serialization Tester to serialize and deserialize out an entire ASTContext and top-level decls.
...
llvm-svn: 43773
2007-11-06 19:50:53 +00:00
Ted Kremenek
e344bbbe84
Renamed "Flush()" to "FlushRecord()".
...
llvm-svn: 43772
2007-11-06 19:49:50 +00:00
Ted Kremenek
d015c7b4fd
Added support for processing abbreviations in the Deserializer.
...
Added some #ifdef-controlled messages for debugging backpatching.
llvm-svn: 43771
2007-11-06 19:49:16 +00:00
Steve Naroff
2d8aaa7d74
Fix a "basic" bug that resulted in a bogus SourceLocation.
...
Off hand, I don't know why this change makes a difference (I thought the two constructor idioms were equivalent).
llvm-svn: 43770
2007-11-06 19:37:09 +00:00
Chris Lattner
26f288b9ea
fixes from Kelly Wilson.
...
llvm-svn: 43767
2007-11-06 18:13:32 +00:00
Bill Wendling
56235a28ce
Clarify some of the iostreams stuff.
...
llvm-svn: 43766
2007-11-06 09:36:34 +00:00
Evan Cheng
d5d59ad634
First step towards moving the coalescer to priority_queue based machinery.
...
llvm-svn: 43764
2007-11-06 08:52:21 +00:00
Evan Cheng
92d23e5204
Fix a bug where a def use operand isn't being detected as a sub-register use.
...
llvm-svn: 43763
2007-11-06 08:50:44 +00:00
Evan Cheng
2dbffa4e76
Add pseudo dependency to force two-address instruction to be scheduled after
...
other uses. There was a overly restricted check that prevented some obvious
cases.
llvm-svn: 43762
2007-11-06 08:44:59 +00:00
Chris Lattner
ff25240bae
edits for chapter 3
...
llvm-svn: 43761
2007-11-06 07:26:32 +00:00
Chris Lattner
401bf39fa4
chapter 2 edits
...
llvm-svn: 43760
2007-11-06 07:16:22 +00:00
Chris Lattner
f0d84f1cc7
edits
...
llvm-svn: 43758
2007-11-06 06:32:18 +00:00
Chris Lattner
45d561ad99
improve decl merging logic to be more correct with
...
functions. Patch contributed by Nuno Lopes, thanks!
llvm-svn: 43757
2007-11-06 06:07:26 +00:00
Chris Lattner
0fc613b85d
Fix PR1774 and BasicAA/2007-11-05-SizeCrash.ll
...
llvm-svn: 43756
2007-11-06 05:58:42 +00:00
Owen Anderson
d378cea030
Add a few comments.
...
llvm-svn: 43755
2007-11-06 05:26:02 +00:00
Owen Anderson
eb964eb2c8
DomForest is a forest of registers, not instructions.
...
llvm-svn: 43754
2007-11-06 05:22:43 +00:00
Chris Lattner
978ec3c389
clarify what proto is.
...
llvm-svn: 43753
2007-11-06 05:07:30 +00:00
Chris Lattner
0bf330a1bc
Add a real intro to the series.
...
llvm-svn: 43752
2007-11-06 05:02:48 +00:00
Owen Anderson
a9057f0b97
StrongPHIElimination requires LiveVariables.
...
llvm-svn: 43751
2007-11-06 04:49:43 +00:00
Chris Lattner
3209725c68
Add better validation for array types when merging decls. Patch
...
contributed by Oliver Hunt, thanks!
llvm-svn: 43750
2007-11-06 04:28:31 +00:00
Bruno Cardoso Lopes
87bb032c05
Better processor definition
...
llvm-svn: 43749
2007-11-06 03:15:20 +00:00
Chris Lattner
4f4048a174
typo from Ryan Brown.
...
llvm-svn: 43748
2007-11-06 01:40:41 +00:00
Chris Lattner
e6819aeee0
fixes from Ryan Brown.
...
llvm-svn: 43747
2007-11-06 01:39:12 +00:00
Owen Anderson
0d28238a1f
Add a missing #include.
...
llvm-svn: 43746
2007-11-06 01:26:56 +00:00
Chris Lattner
362709dff1
wrap long lines
...
llvm-svn: 43745
2007-11-06 01:15:27 +00:00
Dan Gohman
08143e397d
Add support for vector remainder operations.
...
llvm-svn: 43744
2007-11-05 23:35:22 +00:00
Dan Gohman
4decbc5002
Fix an abort in instcombine when folding creates a vector rem instruction.
...
llvm-svn: 43743
2007-11-05 23:16:33 +00:00
Rafael Espindola
fa0df55bdd
Move the LowerMEMCPY and LowerMEMCPYCall to a common place.
...
Thanks for the suggestions Bill :-)
llvm-svn: 43742
2007-11-05 23:12:20 +00:00
Ted Kremenek
f7f7ddfd7e
Added registration to deserialization engine of IdentifierInfo* as
...
IdentifierInfos are deserialized.
llvm-svn: 43741
2007-11-05 22:42:32 +00:00
Ted Kremenek
72f073acd4
Implemented serialization of TypedefDecls.
...
Fixed infinite recursion in VarDecl::InternalRead.
llvm-svn: 43739
2007-11-05 21:49:34 +00:00
Ted Kremenek
15f50ba755
In driver code implemented serialization of ASTContext. Working on serialization of simple ASTs.
...
llvm-svn: 43738
2007-11-05 21:39:35 +00:00
Ted Kremenek
7f6e70c5c2
Added skeleton for dispatch of Decl serialization.
...
llvm-svn: 43737
2007-11-05 21:38:00 +00:00
Ted Kremenek
4556582e2b
Added support in serializer and deserializer to create arbitrary blocks.
...
Added detection of end-of-stream in deserializer.
llvm-svn: 43736
2007-11-05 21:36:35 +00:00
Dale Johannesen
4646aa3e33
Make labels work in asm blocks; allow labels as
...
parameters. Rename ValueRefList to ParamList
in AsmParser, since its only use is for parameters.
llvm-svn: 43734
2007-11-05 21:20:28 +00:00
Ted Kremenek
58473ab478
For serialization of ASTContext, added special-casing of serialization
...
of type sets when emitting complex types and pointer types that are
also considered builtins. These types are automatically created in
the ctor of ASTContext, and thus should not be serialized (was
producing an error during deserialization).
llvm-svn: 43733
2007-11-05 20:49:23 +00:00
Ted Kremenek
e7fb505f58
Added default creation of root-level block by bitstream serializer.
...
llvm-svn: 43732
2007-11-05 20:47:27 +00:00
Chris Lattner
2f86ed734d
merge in various fixes from Kelly Wilson.
...
llvm-svn: 43731
2007-11-05 20:13:56 +00:00
Chris Lattner
fbfae1bd7e
add some links to the tutorial index and between chapters.
...
llvm-svn: 43730
2007-11-05 20:04:56 +00:00
Chris Lattner
a25729e0d0
grammaro
...
llvm-svn: 43729
2007-11-05 19:33:52 +00:00
Devang Patel
b98d2050a2
If a value is incoming from outside the loop then the value does not need remapping and the value is never tracked through LastValueMap.
...
llvm-svn: 43728
2007-11-05 19:32:30 +00:00
Chris Lattner
4484d8d7f0
recursive types are our friend.
...
llvm-svn: 43727
2007-11-05 19:28:07 +00:00
Chris Lattner
2a8fd134ea
mention possibility of using a visitor
...
llvm-svn: 43726
2007-11-05 19:25:14 +00:00
Chris Lattner
a94cfa13e7
clarify why prototype::codegen returns a function.
...
llvm-svn: 43725
2007-11-05 19:22:50 +00:00
Chris Lattner
fd3cb0890b
TOC for chapter 8
...
llvm-svn: 43724
2007-11-05 19:10:15 +00:00
Chris Lattner
639a18dc26
add table of contents to each chapter.
...
llvm-svn: 43723
2007-11-05 19:06:59 +00:00
Lauro Ramos Venancio
1a30c18e88
[ARM] Fix code generation for:
...
static __thread struct {
int a;
int b;
} teste = {0, 0};
llvm-svn: 43722
2007-11-05 18:33:37 +00:00
Ted Kremenek
e93520d977
Fixed bug where tombstone key and empty key for DenseMap used for
...
pointer backpatching in deserializer were improperly created and
resulted in an assertion failure.
llvm-svn: 43721
2007-11-05 18:13:03 +00:00
Duncan Sands
f7ae8bd090
Don't output ABI size padding twice. By using the store
...
size for the field we get ABI padding automatically, so
no need to put it in again when we emit the field.
llvm-svn: 43720
2007-11-05 18:03:02 +00:00
Chris Lattner
38eec3071a
add link to llvmbuilder doxygen docs
...
llvm-svn: 43719
2007-11-05 18:02:15 +00:00
Chris Lattner
9b2f7773ac
spell identifier correctly.
...
llvm-svn: 43718
2007-11-05 17:54:34 +00:00
Chris Lattner
e02310d5e3
fix typo
...
llvm-svn: 43717
2007-11-05 17:52:04 +00:00
Fariborz Jahanian
63ac80e76a
Misc. fixes. 1) Resurrect meta-data generation turned off by a previous patch.
...
2) Fixed a regression in meta-data generation caused by removal of '_interface' prefix from synthesize class name.
3) Added stubs for @try/@catch/@finally statements.
llvm-svn: 43716
2007-11-05 17:47:33 +00:00
Chris Lattner
2172186c7b
Dan points out that mem2reg also promotes vectors: be more precise.
...
llvm-svn: 43715
2007-11-05 17:45:54 +00:00
Evan Cheng
8bb30184a8
Move SimpleRegisterCoalescing.h to lib/CodeGen since there is now a common
...
register coalescer interface: RegisterCoalescing.
llvm-svn: 43714
2007-11-05 17:41:38 +00:00
Ted Kremenek
a6d9f3c2cf
Made methods "Emit" and "Materialize" in ASTContext (used for serialization) public.
...
llvm-svn: 43713
2007-11-05 17:41:25 +00:00
Chris Lattner
3527796804
clarify
...
llvm-svn: 43712
2007-11-05 17:39:26 +00:00
Chris Lattner
3a39ad630a
fix typo
...
llvm-svn: 43711
2007-11-05 17:38:34 +00:00
Ted Kremenek
31b789c0d8
Added TypeSerialization.cpp and DeclSerialization.cpp to the XCode project.
...
llvm-svn: 43710
2007-11-05 17:04:40 +00:00
Duncan Sands
d6f131ba6f
Fix some typos.
...
llvm-svn: 43709
2007-11-05 16:04:58 +00:00
Steve Naroff
96d20616c4
Sema::ActOnClassMessage()...if a class method isn't found, lookup an instance method. Since all classes are also instances, this is appropriate.
...
llvm-svn: 43708
2007-11-05 15:27:52 +00:00
Duncan Sands
f8bc406d5d
Trivial fixes.
...
llvm-svn: 43707
2007-11-05 15:15:50 +00:00
Steve Naroff
bd72289baa
Declare objc_selector outside the prototype for objc_msgSend(), removing a silly warning.
...
llvm-svn: 43706
2007-11-05 14:55:35 +00:00
Steve Naroff
e4f9b23458
Rewrite @selector(sel).
...
llvm-svn: 43705
2007-11-05 14:50:49 +00:00
Steve Naroff
98eb8d1275
- change the synthesized typedef (for classes) to be of type "objc_object".
...
- fix a couple bugs in RewriteObjCStringLiteral.
- convert "Class" -> "id" in RewriteMessageExpr.
llvm-svn: 43704
2007-11-05 14:36:37 +00:00
Evan Cheng
9337929aae
Use movups to spill / restore SSE registers on targets where stacks alignment is
...
less than 16. This is a temporary solution until dynamic stack alignment is
implemented.
llvm-svn: 43703
2007-11-05 07:30:01 +00:00
Chris Lattner
6cdadb6041
add a link.
...
llvm-svn: 43702
2007-11-05 07:02:49 +00:00
Chris Lattner
044edf41df
finish the tutorial, yaay.
...
comments and feedback welcome.
llvm-svn: 43701
2007-11-05 07:00:54 +00:00
Evan Cheng
17b0e3e1ae
Skip over deleted val#'s.
...
llvm-svn: 43700
2007-11-05 06:46:45 +00:00
Evan Cheng
a406b47f14
Handle cases where a register and one of its super-register are both marked as
...
defined on the same instruction. This fixes PR1767.
llvm-svn: 43699
2007-11-05 03:11:55 +00:00
Evan Cheng
e12363dac5
Fix test case. Chris didn't do make check. :-)
...
llvm-svn: 43698
2007-11-05 03:04:26 +00:00
Bruno Cardoso Lopes
3e0d030dad
Added support for PIC code with "explicit relocations" *only*.
...
Removed all macro code for PIC (goodbye "la").
Support tested with shootout bench.
llvm-svn: 43697
2007-11-05 03:02:32 +00:00
Gordon Henriksen
2657b218ea
Bringing Passes.html up-to-date with the deletion of the
...
-emitbitcode option and the addition of -preverify.
llvm-svn: 43696
2007-11-05 02:05:35 +00:00
Chris Lattner
b7a5dbb4db
Add the first section of chapter 8.
...
llvm-svn: 43695
2007-11-05 01:58:13 +00:00
Gordon Henriksen
2ed067a0d9
Deleting redundant copy of block extractor pass. See also PR1775.
...
llvm-svn: 43694
2007-11-05 01:54:05 +00:00
Evan Cheng
c68023a955
Doh. PR1187 -> PR1766.
...
llvm-svn: 43693
2007-11-05 01:00:44 +00:00
Evan Cheng
a8044084ac
Fix PR1187.
...
llvm-svn: 43692
2007-11-05 00:59:10 +00:00
Duncan Sands
f07fa24289
If a long double is in a packed struct, it may be
...
that there is no padding.
llvm-svn: 43691
2007-11-05 00:35:07 +00:00
Steve Naroff
3865e4d8b4
Remove HandleObjcMetaDataEmission(), I inadvertantly resurrected it.
...
llvm-svn: 43690
2007-11-05 00:25:00 +00:00
Chris Lattner
350759513b
finish the chapter.
...
llvm-svn: 43689
2007-11-05 00:23:57 +00:00
Duncan Sands
283207a71c
Eliminate the remaining uses of getTypeSize. This
...
should only effect x86 when using long double. Now
12/16 bytes are output for long double globals (the
exact amount depends on the alignment). This brings
globals in line with the rest of LLVM: the space
reserved for an object is now always the ABI size.
One tricky point is that only 10 bytes should be
output for long double if it is a field in a packed
struct, which is the reason for the additional
argument to EmitGlobalConstant.
llvm-svn: 43688
2007-11-05 00:04:43 +00:00
Steve Naroff
f36987c79b
Two additions...
...
- Synthesize the funky cast for objc_msgSend(). For the basic case, it looks like...
((id (*)(id, SEL))(void *)objc_msgSend)(obj, sel);
The "void *" cast is needed to workaround a GCC "bandaid" (Chris says it has something to do with the inliner). Without the extra "void *" cast, we get spurious warnings/notes that look like...
xx.m:17: warning: function called through a non-compatible type
xx.m:17: note: if this code is reached, the program will abort
- Add prototypes for the ObjC functions we call, objc_msgSend/objc_getClass for now (don't depend on them being included).
llvm-svn: 43685
2007-11-04 22:37:50 +00:00
Owen Anderson
eea82746b3
Another step of stronger PHI elimination down.
...
llvm-svn: 43684
2007-11-04 22:33:26 +00:00
Gordon Henriksen
35f398a9cd
Deleting -emitbitcode option which did nothing.
...
llvm-svn: 43683
2007-11-04 20:28:31 +00:00
Chris Lattner
0e6b674993
fix typos
...
llvm-svn: 43682
2007-11-04 19:42:13 +00:00
Chris Lattner
9329e780cd
Fix PR1761 by not printing (rip) suffix when in -static mode.
...
Evan, please review this.
llvm-svn: 43680
2007-11-04 19:23:28 +00:00
Gordon Henriksen
ad45991a86
Validation fix.
...
llvm-svn: 43679
2007-11-04 18:17:58 +00:00
Gordon Henriksen
c55d1f6c7f
Typo fix.
...
llvm-svn: 43678
2007-11-04 18:14:08 +00:00
Gordon Henriksen
9f6c4c45d7
Completing Passes.html with the exception of -emitbitcode, which should be
...
removed. This document could still stand for significant improvement:
* Editing the pass descriptions; most were lifted with minimal editing from
comments. Although implementation details were elided, many of the were not
written for the audience that would be interested in this document.
* More "before and after" examples.
* More implicit dependency details. (Perhaps listing transforms in
-std-compile-opts order would help alleviate this.)
* Adding documentation for how to invoke passes programmatically.
* Rearranging the document into a more logical taxonomy. For instance, putting
profiling passes together.
llvm-svn: 43677
2007-11-04 18:10:18 +00:00
Nick Lewycky
d954dcd138
Fix crash before main on ppc/linux with static constructors. PR1771
...
llvm-svn: 43676
2007-11-04 17:32:10 +00:00
Gordon Henriksen
a18a276350
Fix a validation error.
...
llvm-svn: 43675
2007-11-04 16:17:00 +00:00
Gordon Henriksen
d568767ecb
Finishing initial docs for all transformations in Passes.html.
...
Also cleaned up some comments in source files.
llvm-svn: 43674
2007-11-04 16:15:04 +00:00
Gordon Henriksen
d210e9d880
Removing a dead reference from LLVM.xcodeproj.
...
llvm-svn: 43673
2007-11-04 16:12:17 +00:00
Duncan Sands
399d97987b
Change uses of getTypeSize to getABITypeSize, getTypeStoreSize
...
or getTypeSizeInBits as appropriate in ScalarReplAggregates.
The right change to make was not always obvious, so it would
be good to have an sroa guru review this. While there I noticed
some bugs, and fixed them: (1) arrays of x86 long double have
holes due to alignment padding, but this wasn't being spotted
by HasStructPadding (renamed to HasPadding). The same goes
for arrays of oddly sized ints. Vectors also suffer from this,
in fact the problem for vectors is much worse because basic
vector assumptions seem to be broken by vectors of type with
alignment padding. I didn't try to fix any of these vector
problems. (2) The code for extracting smaller integers from
larger ones (in the "int union" case) was wrong on big-endian
machines for integers with size not a multiple of 8, like i1.
Probably this is impossible to hit via llvm-gcc, but I fixed
it anyway while there and added a testcase. I also got rid of
some trailing whitespace and changed a function name which
had an obvious typo in it.
llvm-svn: 43672
2007-11-04 14:43:57 +00:00
Evan Cheng
5c1b044899
If an interval is being undone clear its preference as well since the source interval may have been undone as well.
...
llvm-svn: 43670
2007-11-04 08:32:21 +00:00
Chris Lattner
296160d443
Fix PR1763 by allowing the 'q' constraint to work with 64-bit
...
regs on x86-64.
llvm-svn: 43669
2007-11-04 06:51:12 +00:00
Chris Lattner
ce8c62665a
Disable tail duplication of call instructions. The cost
...
metric is way off for these in general, and this works around
buggy code like that in PR1764. we'll see if there is a big
performance impact of this. If so, I'll revert it tomorrow.
llvm-svn: 43668
2007-11-04 06:37:55 +00:00
Chris Lattner
65a146d418
finish the 'Memory in LLVM' section
...
llvm-svn: 43667
2007-11-03 22:22:30 +00:00
Steve Naroff
66697aa72f
Add a method prototype slot/getter to the ObjCMessageExpr AST.
...
llvm-svn: 43666
2007-11-03 16:37:59 +00:00
Steve Naroff
a397efd915
Implement rewrite rules for ObjC string constants.
...
llvm-svn: 43665
2007-11-03 11:27:19 +00:00
Chris Lattner
dfcc3f26ae
hack and slash the first 20% of chapter seven.
...
llvm-svn: 43663
2007-11-03 08:55:29 +00:00
Evan Cheng
66298e226f
There are times when the coalescer would not coalesce away a copy but the copy
...
can be eliminated by the allocator is the destination and source targets the
same register. The most common case is when the source and destination registers
are in different class. For example, on x86 mov32to32_ targets GR32_ which
contains a subset of the registers in GR32.
The allocator can do 2 things:
1. Set the preferred allocation for the destination of a copy to that of its source.
2. After allocation is done, change the allocation of a copy destination (if
legal) so the copy can be eliminated.
This eliminates 443 extra moves from 403.gcc.
llvm-svn: 43662
2007-11-03 07:20:12 +00:00
Chris Lattner
376cdaf50b
Fix ownership model of ParseAST to allow the dtor of
...
ASTConsumer to process the AST before it is destroyed.
This allows elimination of HandleObjcMetaDataEmission.
llvm-svn: 43659
2007-11-03 06:24:16 +00:00
Fariborz Jahanian
9ffbd2d648
Provide both const and non-const accessor methods for @try and @finally ASTs.
...
My previous patch did the same for @catch AST.
llvm-svn: 43654
2007-11-03 00:38:38 +00:00
Fariborz Jahanian
e21451fc0d
Provide const and none-const version of methods accessing various @catch nodes
...
llvm-svn: 43653
2007-11-03 00:34:02 +00:00
Dan Gohman
d7917b6248
Add std:: to sort calls.
...
llvm-svn: 43652
2007-11-02 22:24:01 +00:00
Dan Gohman
c981d72d1a
Change illegal uses of ++ to uses of STLExtra.h's next function.
...
llvm-svn: 43651
2007-11-02 22:22:02 +00:00
Fariborz Jahanian
8815795049
pretty-print @try/@catch/@finally from AST as the validation of AST.
...
llvm-svn: 43649
2007-11-02 18:16:07 +00:00
Ted Kremenek
dda9a56975
Added most of the boilerplate code for Decl serialization. Still a few
...
key functions to implement.
llvm-svn: 43648
2007-11-02 18:05:11 +00:00
Ted Kremenek
3ae79b3d13
Added overloaded version of Deserializer::ReadOwnedPtr which allows
...
the target pointer to be passed by reference. This can result in less
typing, as the object to be deserialized can be inferred from the
argument.
llvm-svn: 43647
2007-11-02 18:04:20 +00:00
Evan Cheng
2b93a20b09
Unbreak tailcall opt.
...
llvm-svn: 43646
2007-11-02 17:45:40 +00:00
Evan Cheng
0442889b18
Add run line.
...
llvm-svn: 43645
2007-11-02 17:36:58 +00:00
Evan Cheng
f851163c53
One more extract_subreg coalescing bug.
...
llvm-svn: 43644
2007-11-02 17:35:08 +00:00
Chris Lattner
0b271eb7af
Expose InsertText, fixing an oversight.
...
llvm-svn: 43643
2007-11-02 17:26:47 +00:00
Chris Lattner
389d430c49
add a note
...
llvm-svn: 43642
2007-11-02 17:04:20 +00:00
Anders Carlsson
bfd60eedd7
Generate code for member exprs.
...
llvm-svn: 43641
2007-11-02 16:59:10 +00:00
Fariborz Jahanian
f859ef293c
AST for @try statement.
...
llvm-svn: 43640
2007-11-02 15:39:31 +00:00
Duncan Sands
04059dd351
Fix a thinko.
...
llvm-svn: 43639
2007-11-02 15:18:06 +00:00
Neil Booth
758d0fd736
Remove some unnecessary C-style statics.
...
Restore an assertion that arithmetic can be performed on this format.
llvm-svn: 43638
2007-11-02 15:10:05 +00:00
Chris Lattner
74f87df108
fix typos
...
llvm-svn: 43637
2007-11-02 05:54:25 +00:00
Chris Lattner
ba2c3cdebb
Finish chapter 6, and add a spiffy demo that shows off the language.
...
llvm-svn: 43636
2007-11-02 05:42:52 +00:00
Owen Anderson
2fd26c3641
VAArgInst does, in fact, read memory.
...
llvm-svn: 43633
2007-11-02 04:01:21 +00:00
Hartmut Kaiser
4a7d2d65e3
Updated VC++ build system
...
llvm-svn: 43632
2007-11-02 01:44:32 +00:00
Hartmut Kaiser
7d888fa180
Updated VC++ build system
...
llvm-svn: 43631
2007-11-02 01:44:08 +00:00
Evan Cheng
e453ff4913
Missing a getNumOperands check.
...
llvm-svn: 43630
2007-11-02 01:26:22 +00:00
Fariborz Jahanian
71234d8a9e
AST for @finally statement.
...
llvm-svn: 43629
2007-11-02 00:18:53 +00:00
Fariborz Jahanian
9e63b98de7
AST build for @catch clause (this is work in progress).
...
llvm-svn: 43628
2007-11-01 23:59:59 +00:00
Neil Booth
ae077d232c
Add back line whose removal somehow crept into prior patch
...
llvm-svn: 43627
2007-11-01 22:51:07 +00:00
Neil Booth
618d0fc377
When converting to integer, do bit manipulations in the destination
...
memory rather than in a copy of the APFloat. This avoids problems
when the destination is wider than our significand and is cleaner.
Also provide deterministic values in all cases where conversion
fails, namely zero for NaNs and the minimal or maximal value
respectively for underflow or overflow.
llvm-svn: 43626
2007-11-01 22:43:37 +00:00
Ted Kremenek
5e2eb261af
Simplified Serialization code for SourceLocation and SourceRange, and
...
updated it to the recently updated Serialization API.
Changed clients of SourceLocation serialization to call the
appropriate new methods.
Updated Decl serialization code to put new skeleton serialization code
in place that is much better than the older trait-specialization
approach.
llvm-svn: 43625
2007-11-01 22:25:41 +00:00
Ted Kremenek
478c6982a8
Removed ReadVal from SerializeTrait<T>, and also removed it from
...
Deserializer.
There were issues with Visual C++ barfing when instantiating
SerializeTrait<T> when "T" was an abstract class AND
SerializeTrait<T>::ReadVal was *never* called:
template <typename T>
struct SerializeTrait {
<SNIP>
static inline T ReadVal(Deserializer& D) { T::ReadVal(D); }
<SNIP>
};
Visual C++ would complain about "T" being an abstract class, even
though ReadVal was never instantiated (although one of the other
member functions were).
Removing this from the trait is not a big deal. It was used hardly
ever, and users who want "read-by-value" deserialization can simply
call the appropriate methods directly instead of relying on
trait-based-dispatch. The trait dispatch for
serialization/deserialization is simply sugar in many cases (like this
one).
llvm-svn: 43624
2007-11-01 22:23:34 +00:00
Fariborz Jahanian
65590b2504
Bunch of class declarations for objective-c's @try-catch statement.
...
llvm-svn: 43623
2007-11-01 21:12:44 +00:00
Duncan Sands
44b8721de8
Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize.
...
The meaning of getTypeSize was not clear - clarifying it is important
now that we have x86 long double and arbitrary precision integers.
The issue with long double is that it requires 80 bits, and this is
not a multiple of its alignment. This gives a primitive type for
which getTypeSize differed from getABITypeSize. For arbitrary precision
integers it is even worse: there is the minimum number of bits needed to
hold the type (eg: 36 for an i36), the maximum number of bits that will
be overwriten when storing the type (40 bits for i36) and the ABI size
(i.e. the storage size rounded up to a multiple of the alignment; 64 bits
for i36).
This patch removes getTypeSize (not really - it is still there but
deprecated to allow for a gradual transition). Instead there is:
(1) getTypeSizeInBits - a number of bits that suffices to hold all
values of the type. For a primitive type, this is the minimum number
of bits. For an i36 this is 36 bits. For x86 long double it is 80.
This corresponds to gcc's TYPE_PRECISION.
(2) getTypeStoreSizeInBits - the maximum number of bits that is
written when storing the type (or read when reading it). For an
i36 this is 40 bits, for an x86 long double it is 80 bits. This
is the size alias analysis is interested in (getTypeStoreSize
returns the number of bytes). There doesn't seem to be anything
corresponding to this in gcc.
(3) getABITypeSizeInBits - this is getTypeStoreSizeInBits rounded
up to a multiple of the alignment. For an i36 this is 64, for an
x86 long double this is 96 or 128 depending on the OS. This is the
spacing between consecutive elements when you form an array out of
this type (getABITypeSize returns the number of bytes). This is
TYPE_SIZE in gcc.
Since successive elements in a SequentialType (arrays, pointers
and vectors) need to be aligned, the spacing between them will be
given by getABITypeSize. This means that the size of an array
is the length times the getABITypeSize. It also means that GEP
computations need to use getABITypeSize when computing offsets.
Furthermore, if an alloca allocates several elements at once then
these too need to be aligned, so the size of the alloca has to be
the number of elements multiplied by getABITypeSize. Logically
speaking this doesn't have to be the case when allocating just
one element, but it is simpler to also use getABITypeSize in this
case. So alloca's and mallocs should use getABITypeSize. Finally,
since gcc's only notion of size is that given by getABITypeSize, if
you want to output assembler etc the same as gcc then getABITypeSize
is the size you want.
Since a store will overwrite no more than getTypeStoreSize bytes,
and a read will read no more than that many bytes, this is the
notion of size appropriate for alias analysis calculations.
In this patch I have corrected all type size uses except some of
those in ScalarReplAggregates, lib/Codegen, lib/Target (the hard
cases). I will get around to auditing these too at some point,
but I could do with some help.
Finally, I made one change which I think wise but others might
consider pointless and suboptimal: in an unpacked struct the
amount of space allocated for a field is now given by the ABI
size rather than getTypeStoreSize. I did this because every
other place that reserves memory for a type (eg: alloca) now
uses getABITypeSize, and I didn't want to make an exception
for unpacked structs, i.e. I did it to make things more uniform.
This only effects structs containing long doubles and arbitrary
precision integers. If someone wants to pack these types more
tightly they can always use a packed struct.
llvm-svn: 43620
2007-11-01 20:53:16 +00:00
Devang Patel
e11664a0ef
Rename classes and collections that maintain record layout information.
...
Now, at AST level record info is maintained by ASTRecordLayout class.
Now, at code gen level record info is maintained by CGRecordLayout class.
llvm-svn: 43619
2007-11-01 19:11:01 +00:00
Ted Kremenek
26a7f3fd56
Implemented serialization of QualTypes within ASTContext. Clarified
...
ownership model of some type pointers. Added FIXMEs to serialization.
Added comments to ASTContext indicating which variables we are intentionally
*not* serializing.
llvm-svn: 43618
2007-11-01 18:11:32 +00:00
Fariborz Jahanian
ac73ff8868
Remaining work to collect objective-c's type qualifiers and use them to encode
...
method types.
llvm-svn: 43617
2007-11-01 17:18:37 +00:00
Steve Naroff
63006473d5
- Remove _interface_ prefix for the synthesized tag names.
...
- Also removed a tab from the generated struct (minor).
llvm-svn: 43616
2007-11-01 17:12:31 +00:00
Ted Kremenek
53155f379e
Changed serialization/deserialization of BuiltinTypes to explicitly serialize
...
each type. This ensures that the order in which the types are serialized
is clear and remains persistent.
llvm-svn: 43615
2007-11-01 17:10:34 +00:00
Ted Kremenek
baa461893b
Reverted unnecessary inlining of operator!=, since negating operator== is
...
just as efficient and much more succinct.
llvm-svn: 43614
2007-11-01 16:35:25 +00:00
Devang Patel
32714064b1
Propagate bitfield info.
...
llvm-svn: 43613
2007-11-01 16:29:56 +00:00
Steve Naroff
50d4205ff9
Implement rewrite rule for commenting out protocol references. For example:
...
extern id /*<NSObject>*/ NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone);
extern void NSDeallocateObject(id /*<NSObject>*/object);
extern id /*<NSObject>*/ NSCopyObject(id /*<NSObject>*/object, unsigned extraBytes, NSZone *zone);
llvm-svn: 43612
2007-11-01 13:24:47 +00:00
Duncan Sands
e0e774b6fd
Don't barf on empty basic blocks. Do not rely on assert
...
doing something - this needs to work for release builds
too. I chose to just abort rather than following the
fancy logic of abortIfBroken, because (1) it is a pain
to do otherwise, and (2) nothing is going to work if the
module is this broken.
llvm-svn: 43611
2007-11-01 10:50:26 +00:00
Bill Wendling
87f460f8ba
Silence a warning saying that the variables always resolve to "true" in an
...
expression.
llvm-svn: 43610
2007-11-01 09:38:19 +00:00
Bill Wendling
b7cabbe295
Silence, accersed warning
...
llvm-svn: 43609
2007-11-01 08:51:44 +00:00
Bill Wendling
2b3f7a7e3b
Get rid of compilation warning during release builds
...
llvm-svn: 43608
2007-11-01 08:24:40 +00:00
Chris Lattner
68613c7d31
Add the start of chapter 6, still much to go.
...
llvm-svn: 43607
2007-11-01 06:49:54 +00:00
Evan Cheng
fe1ac52836
- Coalesce extract_subreg when both intervals are relatively small.
...
- Some code clean up.
llvm-svn: 43606
2007-11-01 06:22:48 +00:00
Owen Anderson
2ed651ace7
Fix test/Transforms/DeadStoreElimination/PartialStore.ll, which had been
...
silently failing because of an incorrect run line for some time.
llvm-svn: 43605
2007-11-01 05:29:16 +00:00
Chris Lattner
b338a6b9f3
add support for vector type compatibility checking. Patch by Nate Begeman.
...
llvm-svn: 43604
2007-11-01 05:03:41 +00:00
Chris Lattner
dff7a3e919
remove verifier command line option: this should be part of the API, not
...
a command line optn.
llvm-svn: 43603
2007-11-01 04:43:13 +00:00
Chris Lattner
059a8df289
add a broken gcc version, thanks to P. Durante for pointing this out.
...
llvm-svn: 43602
2007-11-01 04:20:16 +00:00
Owen Anderson
fe41d79112
Now with less tabs!
...
llvm-svn: 43601
2007-11-01 03:54:23 +00:00
Steve Naroff
2f55b98725
Tweak RewriteInterfaceDecl() to generate a typedef (if one hasn't already been generated).
...
llvm-svn: 43600
2007-11-01 03:35:41 +00:00
Chris Lattner
c3ebf29ef6
Implement test/Sema/init.c by treating functions as constants.
...
llvm-svn: 43599
2007-11-01 02:45:17 +00:00
Dale Johannesen
440f9abab4
Test that expand_vector_elt(v2i64) works in 32-bit mode.
...
llvm-svn: 43598
2007-11-01 02:38:24 +00:00
Chris Lattner
6ab19ed78d
Fix InstCombine/2007-10-31-StringCrash.ll by removing an obvious
...
(in hindsight) infinite recursion. Simplify the code.
llvm-svn: 43597
2007-11-01 02:30:35 +00:00
Chris Lattner
74709473ed
Fix InstCombine/2007-10-31-RangeCrash.ll
...
llvm-svn: 43596
2007-11-01 02:18:41 +00:00
Ted Kremenek
fb764e52b0
Rewrote backpatcher. Backpatcher now stores the "has final pointer"
...
flag in the **key** of the backpatch map, as opposed to the mapped
value which contains either the final pointer, or a pointer to a chain
of pointers that need to be backpatched. The bit flag was moved to
the key because we were erroneously assuming that the backpatched
pointers would be at an alignment of >= 2 bytes, which obviously
doesn't work for character strings. Now we just steal the bit from the key.
llvm-svn: 43595
2007-11-01 00:57:37 +00:00
Ted Kremenek
df0768e1b1
Added typedef "value_type" to DenseMap (similar typedef appears in std::map).
...
Added method FindAndConstruct() to DenseMap, which does the same thing as
operator[], except that it refers value_type& (a reference to both the
key and mapped data pair). This method is useful for clients that wish
to access the stored key value, as opposed to the key used to do the
actual lookup (these need not always be the same).
Redefined operator[] to use FindAndConstruct() (same logic).
llvm-svn: 43594
2007-11-01 00:54:57 +00:00
Anders Carlsson
41b7c6b250
Put constant CFStrings in the __DATA,__cfstring section.
...
llvm-svn: 43593
2007-11-01 00:41:52 +00:00
Anders Carlsson
1e27f9b296
Stub out codegen for __builtin_constant_p. Remove any implicit cast exprs in the call to __builtin___CFStringMakeConstantString.
...
llvm-svn: 43592
2007-11-01 00:39:26 +00:00
Devang Patel
0b59b45870
Remove unnecessary method.
...
llvm-svn: 43591
2007-11-01 00:11:37 +00:00
Devang Patel
ad175428c6
start adding pading fields.
...
llvm-svn: 43590
2007-11-01 00:07:12 +00:00
Fariborz Jahanian
7a9c47480d
1) More additions for objective-c's qualifier type.
...
2) Fixed a test failure (which should have failed all along!).
llvm-svn: 43589
2007-10-31 23:53:01 +00:00
Anders Carlsson
e89b84ab29
Fix a typo that prevented pointer-to-int conversions from working.
...
llvm-svn: 43588
2007-10-31 23:18:02 +00:00
Devang Patel
f5fcb9870a
Refactor code into a separate method.
...
llvm-svn: 43587
2007-10-31 23:17:19 +00:00
Fariborz Jahanian
c3cda76362
Fixed a bug exposed by fixing the assert in previous patch (one of the tests asserted).
...
llvm-svn: 43586
2007-10-31 23:08:24 +00:00
Fariborz Jahanian
aa9a95ca4f
Changed direction of assert. Added more comments.
...
llvm-svn: 43585
2007-10-31 22:57:04 +00:00
Ted Kremenek
6aff871a84
Implemented more of serialization/deserialization for ASTContext. We now
...
(hypothetically) read in/write out most of the types. Bugs likely exist.
llvm-svn: 43584
2007-10-31 22:44:07 +00:00
Ted Kremenek
fb41f72916
constified several pointer arguments for methods in the Deserializer.
...
llvm-svn: 43583
2007-10-31 22:42:03 +00:00
Steve Naroff
9c4fdddd0c
Fix two rewriter bugs:
...
- For @class, don't generate multiple typedefs.
- Handle the following edge case interface...
@interface NSMiddleSpecifier : NSObject {}
@end
...which was incorrectly being rewritten to...
struct _interface_NSMiddleSpecifier {
struct _interface_NSObject _NSObject;
};
{}
llvm-svn: 43582
2007-10-31 22:11:35 +00:00
Anders Carlsson
0370eb2034
Handle function calls that return aggregate expressions.
...
llvm-svn: 43581
2007-10-31 22:04:46 +00:00
Fariborz Jahanian
d822d68b74
More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)
...
llvm-svn: 43580
2007-10-31 21:59:43 +00:00
Dan Gohman
b43e020cdb
Fix a regression in test/CodeGen/X86/2007-04-24-VectorCrash.ll introduced
...
by r43510. Gracefully handle constants with vector type that aren't
ConstantVector or ConstantAggregateZero.
llvm-svn: 43579
2007-10-31 21:36:31 +00:00
Owen Anderson
9396c39501
Add a preverifier pass to check that every basic block ends in a terminator, so that we don't segfault when verifying invalid code.
...
llvm-svn: 43578
2007-10-31 21:04:18 +00:00
Devang Patel
cc4c2930ae
New test to verify llvm struct layout.
...
llvm-svn: 43577
2007-10-31 21:02:10 +00:00
Devang Patel
6029cbf872
Check whether next slot meets field type's alignment requirements.
...
If it does not then assert at the moment.
llvm-svn: 43576
2007-10-31 21:01:37 +00:00
Steve Naroff
aaba027717
Implement ObjC built-in types in MinimalAction.
...
This fixes the recent regression with selector-1.m and -parse-noop.
llvm-svn: 43575
2007-10-31 20:55:39 +00:00
Ted Kremenek
b681c68a7e
Implemented short-circuited version of Builtin::Info::operator!=.
...
llvm-svn: 43574
2007-10-31 20:55:27 +00:00
Devang Patel
1c8788bbd0
Keep track of field offsets during structure layout.
...
Take 2.
llvm-svn: 43573
2007-10-31 20:08:22 +00:00
Devang Patel
75ef2f0b45
Take 2.
...
Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress.
At the moment target triplet and target description strings are hard coded in clang::TargetInfo
llvm-svn: 43572
2007-10-31 20:01:01 +00:00
Ted Kremenek
c55cd9a38a
Adjusted QualType deserialization to reflect updated deserialization API.
...
We now serialize ivar references inside of ASTContext.
llvm-svn: 43571
2007-10-31 20:00:03 +00:00
Ted Kremenek
705770664d
Implemented deserialization of references. References are handled
...
just like pointers, except that they cannot be backpatched. This
means that references are essentially non-owning pointers where the
referred object must be deserialized prior to the reference being
deserialized. Because of the nature of references, this ordering of
objects is always possible.
Fixed a bug in backpatching code (returning the backpatched pointer
would accidentally include a bit flag).
llvm-svn: 43570
2007-10-31 19:58:32 +00:00
Devang Patel
7abb7acafd
Initialize MemCpyFn
...
llvm-svn: 43569
2007-10-31 19:54:57 +00:00
Fariborz Jahanian
95b6076c77
Fixed problem with rewriting stand-alone @implementation (with no matching @interface).
...
A new test case added.
llvm-svn: 43568
2007-10-31 18:48:14 +00:00
Steve Naroff
6d40db0dde
Implement a more sensible strategy for ObjC built-in types (addressing a long standing FIXME in Sema::GetObjcIdType()).
...
This removes several gross hacks to work around the previous "lazy" behavior.
Two notes:
- MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME.
- I didn't convert Sema::GetObjcProtoType() yet.
llvm-svn: 43567
2007-10-31 18:42:27 +00:00
Ted Kremenek
e32c067cc4
Preliminary support for serializing statements.
...
llvm-svn: 43566
2007-10-31 18:41:19 +00:00
Ted Kremenek
e119266c19
Added Serializer::EmitRef to deal with emitting arbitrary references.
...
Modified Serializer::EmitPtr to handle const pointers.
llvm-svn: 43565
2007-10-31 18:23:21 +00:00
Ted Kremenek
d2f7cc9f2b
Updated path to clang.cpp in build documentation.
...
llvm-svn: 43564
2007-10-31 17:58:51 +00:00
Ted Kremenek
468b1cb96f
Updated build instructions to not include an absolute line number in clang.cpp to add hard-coded paths.
...
llvm-svn: 43563
2007-10-31 17:57:30 +00:00
Ted Kremenek
08bed095eb
Updated a comment to hopefully silence a Lattner warning.
...
llvm-svn: 43562
2007-10-31 17:53:38 +00:00
Ted Kremenek
9cc9335bdf
Implemented serialization of Variable Array Types (VLAs).
...
llvm-svn: 43561
2007-10-31 17:50:23 +00:00
Fariborz Jahanian
aff228dfc7
Rewriteing of ivars changed to just copy directly from the source.
...
llvm-svn: 43560
2007-10-31 17:29:28 +00:00
Ted Kremenek
ff70faead8
Changed access control within FoldingSet for some ivars from "private"
...
to "protected". This allows iterators to work.
llvm-svn: 43559
2007-10-31 17:12:47 +00:00
Ted Kremenek
fc581a9a89
Renamed ivar "ArrayTypes" in ASTContext to "ComplexArrayTypes".
...
Added skeleton code for serialization of ASTContext.
llvm-svn: 43558
2007-10-31 17:10:13 +00:00
Steve Naroff
ac0216385f
Checking in some code that is still under construction.
...
I need to (finally) change the way Class/id/SEL/IMP are built-in...the current approach of doing it in the preprocessor is "broken". The other problem is Sema::GetObjcIdType/GetObjcSelType/GetObjcClassType, the hooks that initialize ASTContext lazily. These built-in types need to be done up front...
llvm-svn: 43557
2007-10-31 16:03:04 +00:00
Fariborz Jahanian
d728e949bb
After Anders check-in, we can now encode 'Class' type.
...
llvm-svn: 43556
2007-10-31 16:00:13 +00:00
Ted Kremenek
f1d34d3fea
Added a few clarifying steps the the "building clang" section.
...
llvm-svn: 43555
2007-10-31 15:31:24 +00:00
Rafael Espindola
419b6d7ce4
Make ARM and X86 LowerMEMCPY identical by moving the isThumb check into getMaxInlineSizeThreshold
...
and by restructuring the X86 version.
New I just have to move this to a common place :-)
llvm-svn: 43554
2007-10-31 14:39:58 +00:00
Dan Gohman
54048ec9e0
Fix a typo in a comment.
...
llvm-svn: 43553
2007-10-31 14:35:39 +00:00
Rafael Espindola
063f177300
Make ARM an X86 memcpy expansion more similar to each other.
...
Now both subtarget define getMaxInlineSizeThreshold and the expansion uses it.
This should not change generated code.
llvm-svn: 43552
2007-10-31 11:52:06 +00:00
Duncan Sands
3b4668a5d8
Promotion of sdiv/srem/udiv/urem.
...
llvm-svn: 43551
2007-10-31 08:57:43 +00:00
Duncan Sands
21ca939683
Add a newline at the end of the file.
...
llvm-svn: 43550
2007-10-31 08:49:24 +00:00
Chris Lattner
75045da563
fix validation
...
llvm-svn: 43549
2007-10-31 07:30:39 +00:00
Chris Lattner
1db6e89b7a
okay, fine, make me finish this chapter. :)
...
Feedback appreciated!
llvm-svn: 43548
2007-10-31 07:29:43 +00:00
Chris Lattner
6b0fb58110
add the code for expression code that we'll add, though most of the
...
description is missing.
llvm-svn: 43547
2007-10-31 06:47:39 +00:00
Chris Lattner
149c55aba4
Add the first half of chapter 5: if/then/else.
...
To come: for statement.
llvm-svn: 43546
2007-10-31 06:30:21 +00:00
Chris Lattner
da1988477d
__main is dead along with llvm-gcc3.
...
llvm-svn: 43545
2007-10-31 05:53:31 +00:00
Chris Lattner
5087e267c2
temporarily revert devang's patch to link in the llvm codegen etc.
...
llvm-svn: 43544
2007-10-31 04:53:03 +00:00
Steve Naroff
37e011ce43
Add some plumbing to help cope with rewriting "id<p>", "Class<p>*".
...
llvm-svn: 43543
2007-10-31 04:38:33 +00:00
Owen Anderson
0b59fa0605
Add the skeleton of a better PHI elimination pass.
...
llvm-svn: 43542
2007-10-31 03:37:57 +00:00
Owen Anderson
9b8f34f2ac
Some fixes to get MachineDomTree working better.
...
llvm-svn: 43541
2007-10-31 03:30:14 +00:00
Anders Carlsson
f56a7aee2f
Encode Class, SEL and Objective-C objects.
...
llvm-svn: 43540
2007-10-31 02:53:19 +00:00
Devang Patel
df62bc067a
Keep track of field offsets during structure layout.
...
llvm-svn: 43539
2007-10-31 01:23:10 +00:00
Devang Patel
46c7003052
Make target info available to clang code generator.
...
This is far from complete but this helps clang codegen module
make progress.
llvm-svn: 43536
2007-10-31 00:59:29 +00:00
Dale Johannesen
b066c1f216
Make i64=expand_vector_elt(v2i64) work in 32-bit mode.
...
llvm-svn: 43535
2007-10-31 00:32:36 +00:00
Fariborz Jahanian
ca5338196f
Added new type and bitfield fields in some decl types in preparation for objective-c's type qualifiers.
...
Added initialization of Class/SEMA types.
llvm-svn: 43534
2007-10-31 00:12:35 +00:00
Evan Cheng
240c1adade
At end of LSR, replace uses of now constant (as result of SplitCriticalEdge) PHI node with the constant value.
...
llvm-svn: 43533
2007-10-30 23:45:15 +00:00
Ted Kremenek
4f4c3f9fd5
Added member function "size()" to FoldingSet to return the number of
...
nodes in the FoldingSet.
llvm-svn: 43531
2007-10-30 23:35:55 +00:00
Devang Patel
82ae5f255f
Avoid unnecessary PATypeHolder copy.
...
llvm-svn: 43530
2007-10-30 23:22:14 +00:00
Steve Naroff
5cdcd9b61c
Stop pre-defining objc_msgSend/objc_getClass in the preprocessor. Instead, I generate these declaration on the fly when rewriting a message expression.
...
llvm-svn: 43529
2007-10-30 23:14:51 +00:00
Devang Patel
17833d7068
New test.
...
llvm-svn: 43527
2007-10-30 23:07:47 +00:00
Ted Kremenek
e26f3c50c5
Updated some comments.
...
Disabled assignments for ContentCache.
Copy-ctor for ContentCache now has an assertion preventing it to
be copied from an object that already has an allocated buffer.
llvm-svn: 43526
2007-10-30 22:57:35 +00:00
Chris Lattner
595db86c9d
__real__ and __imag__ can be lvalues. Add support to ast and codegen for them.
...
llvm-svn: 43525
2007-10-30 22:53:42 +00:00
Evan Cheng
c2dbfee43f
It's not safe to tell SplitCriticalEdge to merge identical edges. It may delete the phi instruction that's being processed.
...
llvm-svn: 43524
2007-10-30 22:27:26 +00:00
Dale Johannesen
d50c8bcef6
Add missing SSE builtins: CVTPD2PI, CVTPS2PI,
...
CVTTPD2PI, CVTTPS2PI, CVTPI2PD, CVTPI2PS.
llvm-svn: 43523
2007-10-30 22:15:38 +00:00
Ted Kremenek
4c0ef37fbb
Refactored CFG construction code that processes DeclStmts to use StmtIterator.
...
Now CFG construction transparently supports Variable Length Array declarations
with expressions for their sizes, and typedefs that include VLAs.
llvm-svn: 43520
2007-10-30 21:48:34 +00:00
Devang Patel
73721a12ca
Refactor code into a separate method.
...
llvm-svn: 43519
2007-10-30 21:27:20 +00:00
Ted Kremenek
c08bca6ae8
Removed SrcMgr::FileInfo and SrcMgr::InfoRec and replaced them with a
...
single class: ContentCache. This simplifies the logic in
SourceManager and makes the ownership of MemoryBuffers clearer.
llvm-svn: 43518
2007-10-30 21:08:08 +00:00
Ted Kremenek
78036cdd5c
Tightened IgnoreParen.
...
llvm-svn: 43517
2007-10-30 21:03:09 +00:00
Devang Patel
ffe1e218f2
Fix 80 col violations.
...
llvm-svn: 43516
2007-10-30 20:59:40 +00:00
Chris Lattner
0b11172e8c
minor tweaks
...
llvm-svn: 43515
2007-10-30 20:57:56 +00:00
Devang Patel
f5bda316c5
Use
...
+ llvm::DenseMap<Type *, llvm::PATypeHolder> TypeHolderMap;
instead of
- llvm::DenseMap<Type *, llvm::PATypeHolder *> TypeHolderMap;
llvm-svn: 43514
2007-10-30 20:46:47 +00:00
Fariborz Jahanian
4d5b2baa1c
Fixed tests.
...
llvm-svn: 43513
2007-10-30 20:41:57 +00:00
Chris Lattner
e0218997ab
minor code cleanup
...
llvm-svn: 43512
2007-10-30 20:27:44 +00:00
Evan Cheng
0747bc1df6
Typo.
...
llvm-svn: 43511
2007-10-30 20:11:21 +00:00
Dan Gohman
9f39660c20
Add support for folding binary operators with vector zero operands.
...
llvm-svn: 43510
2007-10-30 19:00:49 +00:00
Chris Lattner
de21d55e70
shrinkify storage class to a bitfield, add a fixme about merging it in the future.
...
llvm-svn: 43509
2007-10-30 18:54:50 +00:00
Devang Patel
fa0cb1ef3a
Remove commented out line.
...
llvm-svn: 43508
2007-10-30 18:31:12 +00:00
Fariborz Jahanian
18d7b30241
Revisited my last patch to be able to do encoding of ivar types with 'id'.
...
llvm-svn: 43507
2007-10-30 18:27:03 +00:00
Chris Lattner
74a0ae2c2a
update some comments.
...
llvm-svn: 43506
2007-10-30 17:46:51 +00:00
Chris Lattner
39afd571a0
Avoid using macro expansions, which causes these to come out in -E mode.
...
llvm-svn: 43505
2007-10-30 17:45:43 +00:00
Fariborz Jahanian
509d8d6fc6
Added type encoding for 'id' type.
...
llvm-svn: 43504
2007-10-30 17:06:23 +00:00
Steve Naroff
f921385f40
Rewrite protocols.
...
llvm-svn: 43503
2007-10-30 16:42:30 +00:00
Ted Kremenek
9139310c76
Added vector to ASTContext to store references to "complete" VLA types
...
(VLAs with a specified size expresssion). This vector owns the
references to these type objects.
llvm-svn: 43502
2007-10-30 16:41:53 +00:00
Steve Naroff
5448cf6d61
- Add location info to category/protocol AST's
...
- Rewrite categories.
llvm-svn: 43501
2007-10-30 13:30:57 +00:00
Duncan Sands
b508c53c63
Fix for visibility warnings generated by gcc-4.2.
...
llvm-svn: 43500
2007-10-30 13:14:37 +00:00
Duncan Sands
9ad5465005
Add support for expanding trunc stores. Consider
...
storing an i170 on a 32 bit machine. This is first
promoted to a trunc-i170 store of an i256. On a
little-endian machine this expands to a store of
an i128 and a trunc-i42 store of an i128. The
trunc-i42 store is further expanded to a trunc-i42
store of an i64, then to a store of an i32 and a
trunc-i10 store of an i32. At this point the operand
type is legal (i32) and expansion stops (legalization
of the trunc-i10 needs to be handled in LegalizeDAG.cpp).
On big-endian machines the high bits are stored first,
and some bit-fiddling is needed in order to generate
aligned stores.
llvm-svn: 43499
2007-10-30 12:50:39 +00:00
Duncan Sands
341f093bb1
If a call to getTruncStore is for a normal store,
...
offload to getStore rather than trying to handle
both cases at once (the assertions for example
assume the store really is truncating).
llvm-svn: 43498
2007-10-30 12:40:58 +00:00
Steve Naroff
4cd61acc33
Remove a couple FIXME's for rewriting ObjC interfaces (which are now being rewritten properly).
...
llvm-svn: 43494
2007-10-30 03:43:13 +00:00
Steve Naroff
c54840433f
More support for rewriting ObjC intefaces. Still some edge cases to handle...
...
llvm-svn: 43493
2007-10-30 02:23:23 +00:00
Dale Johannesen
3f156de60d
Fix argument types for PSLLQ, PSRLQ.
...
llvm-svn: 43490
2007-10-30 01:44:33 +00:00
Dale Johannesen
6aa304e529
Add missing MMX PSUBQ.
...
llvm-svn: 43488
2007-10-30 01:18:38 +00:00
Anders Carlsson
df4cc6160f
Handle function types.
...
llvm-svn: 43485
2007-10-30 00:06:20 +00:00
Fariborz Jahanian
31d05db565
Assert if isObjcIdType is called before 'id' type is built.
...
llvm-svn: 43484
2007-10-30 00:00:49 +00:00
Ted Kremenek
843ebedde4
VariableArrayTypes (VLAs) without a size expression are now uniqued
...
and inserted into a FoldingSet owned by ASTContext.
llvm-svn: 43482
2007-10-29 23:37:31 +00:00
Fariborz Jahanian
797f24cd7e
Encoding for objectiive-c methods.
...
llvm-svn: 43481
2007-10-29 22:57:28 +00:00
Evan Cheng
b024c4c81d
- Bug fixes.
...
- Allow icmp rewrite using an iv / stride of a smaller integer type.
llvm-svn: 43480
2007-10-29 22:07:18 +00:00
Hartmut Kaiser
f557d896cb
Updated VC++ build system
...
llvm-svn: 43479
2007-10-29 21:56:15 +00:00
Hartmut Kaiser
b20beb88cd
Updated VC++ build system
...
llvm-svn: 43478
2007-10-29 21:54:46 +00:00
Hartmut Kaiser
ae240716ec
Added a missing #include.
...
llvm-svn: 43477
2007-10-29 21:54:12 +00:00
Steve Naroff
e093339601
Remove a bunch of TODO's that have been done for quite some time...
...
llvm-svn: 43476
2007-10-29 21:39:29 +00:00
Steve Naroff
33a1e80dd1
This commit contains lot's of small tweaks to how we pass around and store SourceLocation's for interfaces/protocols/categories/implementations.
...
llvm-svn: 43475
2007-10-29 21:38:07 +00:00
Ted Kremenek
31974dfcdf
Added support for StmtIterators to iterate over the size expressions
...
of VariableArrayTypes that appear in TypedefDecls.
for example:
typedef int T[x][x];
the StmtIterator will iterate over "x" and "x" as subexpressions of
the DeclStmt for T.
llvm-svn: 43474
2007-10-29 21:38:03 +00:00
Ted Kremenek
899ef13376
Fixed deadcode bug where check for NULL decl occured within a block
...
where the decl would always be non-NULL. Moved the check to after the
block to properly tidy up the iterator's state.
llvm-svn: 43473
2007-10-29 21:23:58 +00:00
Devang Patel
134b3f4b55
Add RecordOrganizer::layoutUnionFields()
...
llvm-svn: 43472
2007-10-29 20:50:19 +00:00
Ted Kremenek
2f70e71dcc
Modified StmtIterator to support iteration over the size expressions
...
of VariableTypeArray types that appear in DeclStmts.
Removed operator-- from StmtIterator. operator-- added undesired
complexity, and we have no consumers of it.
llvm-svn: 43471
2007-10-29 20:50:16 +00:00
Dan Gohman
ae95d72a52
Fix a DAGCombiner abort on a bitcast from a scalar to a vector.
...
llvm-svn: 43470
2007-10-29 20:44:42 +00:00
Ted Kremenek
6d845f0414
Modified CFG pretty-printing to directly use the (reverse) body
...
iterator of a CompountStmt instead of relying on StmtIterators.
llvm-svn: 43469
2007-10-29 20:41:04 +00:00
Dan Gohman
2aec186dd0
Don't bitcast from pointer-to-vector to pointer-to-array when
...
lowering load and store instructions.
llvm-svn: 43468
2007-10-29 20:34:35 +00:00
Dan Gohman
3bcd5fe9f1
Use an array instead of a fixed-length std::vector.
...
llvm-svn: 43467
2007-10-29 20:24:00 +00:00
Dan Gohman
d9911e21df
Do a real assert if there is an unhandled vector instruction instead
...
of just printing to cerr.
llvm-svn: 43466
2007-10-29 20:14:29 +00:00
Evan Cheng
e106e2f142
Enable more fold (sext (load x)) -> (sext (truncate (sextload x)))
...
transformation. Previously, it's restricted by ensuring the number of load uses
is one. Now the restriction is loosened up by allowing setcc uses to be
"extended" (e.g. setcc x, c, eq -> setcc sext(x), sext(c), eq).
llvm-svn: 43465
2007-10-29 19:58:20 +00:00
Dan Gohman
1961c28d46
Add explicit keywords.
...
llvm-svn: 43464
2007-10-29 19:52:04 +00:00
Dan Gohman
7414e21ec0
Update a comment to reflect the current code.
...
llvm-svn: 43463
2007-10-29 19:32:39 +00:00
Dan Gohman
f5feb01056
Remove an unused function argument.
...
llvm-svn: 43462
2007-10-29 19:31:25 +00:00
Dan Gohman
50d42224d0
Fix a typo in a comment.
...
llvm-svn: 43461
2007-10-29 19:26:14 +00:00
Dan Gohman
8e8adada83
Avoid calling ValidStride when not all uses are addresses.
...
llvm-svn: 43460
2007-10-29 19:23:53 +00:00
Ted Kremenek
ef23e34bba
Fixed warning concerning implicit conversion from a NULL pointer
...
constant to an unsigned int. We now just directly assign the literal 0.
llvm-svn: 43459
2007-10-29 18:43:39 +00:00
Ted Kremenek
a80b257a21
Renamed internal variables of StmtIteratorBase to make the code
...
slightly more succinct.
Introduced VariableArrayType* within StmtIteratorBase to (soon)
support iteration over the size expressions of variable length arrays.
llvm-svn: 43455
2007-10-29 18:04:38 +00:00
Fariborz Jahanian
bc2759372b
Do the encoding of ivar types in the ivar metadata.
...
llvm-svn: 43454
2007-10-29 17:16:25 +00:00
Ted Kremenek
e2763b0948
Added some comments.
...
Moved a dependent predicate in an if statement to be an assertion
within the if statement body.
llvm-svn: 43453
2007-10-29 17:13:39 +00:00
Chris Lattner
00860d7574
update testcase
...
llvm-svn: 43452
2007-10-29 17:06:35 +00:00
Ted Kremenek
5d18ce750a
Added to test case for "self-comparison check" uses of relation operators: x < x and x > x
...
should emit warnings.
llvm-svn: 43451
2007-10-29 17:02:56 +00:00
Ted Kremenek
e451eae8d7
For non-floating point types, added check for expressions of the form
...
"x == x" and "x != x". We emit a warning for these since they always evaluate
to a constant value and often indicate a logical error.
Added test case for this check.
llvm-svn: 43450
2007-10-29 16:58:49 +00:00
Devang Patel
d45e055f2c
Insetead of assert() just emit an error message for
...
an unimplemented work and continue.
llvm-svn: 43449
2007-10-29 16:56:27 +00:00
Ted Kremenek
fa907b8168
For floating point equality check, we now ignore parentheses. e.g.:
...
(x) == x is the treated the same as x == x.
llvm-svn: 43448
2007-10-29 16:45:23 +00:00
Ted Kremenek
d4ecc6da67
For checking for floating point comparison using == or !=, we now suppress
...
errors for cases such as "x == x".
Added test case to test this feature.
llvm-svn: 43447
2007-10-29 16:40:01 +00:00
Evan Cheng
7b3f7feaea
Avoid doing something dumb like rewriting using a 64-bit iv in 32-bit mode.
...
llvm-svn: 43446
2007-10-29 07:57:50 +00:00
Anders Carlsson
18acd44514
Address Chris's comments.
...
llvm-svn: 43445
2007-10-29 06:33:42 +00:00
Chris Lattner
909a54ccd4
add a note.
...
llvm-svn: 43444
2007-10-29 06:19:48 +00:00
Anders Carlsson
0f1cacd049
Fix logic error.
...
llvm-svn: 43443
2007-10-29 05:58:43 +00:00
Chris Lattner
c541c3ee15
Model stacksave and stackrestore as both writing memory, since we
...
don't model their dependences on allocas correctly. This fixes
PR1745.
llvm-svn: 43442
2007-10-29 05:47:52 +00:00
Chris Lattner
b104d31bd9
when checking for type equality, ignore typedefs.
...
llvm-svn: 43441
2007-10-29 05:15:40 +00:00
Chris Lattner
5c5808a9a3
improve error recovery handling broken 'then' or 'else' stmts in
...
if statements. This implements Sema/if-empty-body.c:f3, silencing
a bogus secondary warning. It also improve the location info for
the nullstmts created for recovery purposes.
llvm-svn: 43440
2007-10-29 05:08:52 +00:00
Anders Carlsson
d849982e84
Add (partial) support for @encode.
...
llvm-svn: 43439
2007-10-29 05:01:08 +00:00
Owen Anderson
3692dbe492
Add a first attempt at dominator information for MBB's. Use with caution: this has been tested to compile. It has not yet been confirmed to generate correct analysis.
...
llvm-svn: 43438
2007-10-29 04:50:50 +00:00
Chris Lattner
70ae491e42
The callers of ParseStructDeclaration are not expecting it to
...
eat the terminating ;. Fix one place where it did, allowing this
to compile without error:
struct x {
int a;
union {
int b;
float c;
};
int d;
};
This reduces diagnostics on PR1750 from 33 to 27.
llvm-svn: 43437
2007-10-29 04:42:53 +00:00
Chris Lattner
3bc4d20862
casting to void is ok for structs (C99 6.5.4p2), this fixes
...
one bogus error on PR1750.
llvm-svn: 43436
2007-10-29 04:26:44 +00:00
Chris Lattner
cc779571b8
Add prototype info for __builtin_memcpy, reducing #diagnostics from 37 to 34 on
...
PR1750
llvm-svn: 43435
2007-10-29 04:18:06 +00:00
Chris Lattner
645ff3ff61
Fix a parser bug on labeled inline asm stmts, allowing us
...
to parse stuff like:
asm volatile("1: rex64/fxrstor (%[fx])\n\t"
"2:\n"
".section .fixup,\"ax\"\n"
"3: movl $-1,%[err]\n"
" jmp 2b\n"
".previous\n"
".section __ex_table,\"a\"\n"
" .align 8\n"
" .quad 1b,3b\n"
".previous"
: [err] "=r" (err)
: [fx] "cdaSDb" (fx), "m" (*fx), "0" (0));
This reduces # diagnostics on PR1750 from 49 to 37.
llvm-svn: 43434
2007-10-29 04:06:22 +00:00
Chris Lattner
73c56c0735
Implement *skeletal* support for representing GNU inline asm stmts in the AST,
...
resolving a crash on a .i file in PR1750. We now generate 49 errors on the
.i file in that bug.
llvm-svn: 43433
2007-10-29 04:04:16 +00:00
Chris Lattner
1159f065be
Fix a major bug in the Type::getAs*Type methods: they didn't strip off
...
typeof(type) and typeof(expr) correctly. Now provide a single point of
contact (Type::getDesugaredType) for doing the shallow stripping we need.
llvm-svn: 43432
2007-10-29 03:41:11 +00:00
Chris Lattner
b6fc40e60f
I am not sure this is a good idea to be an option, but rename the option for
...
now. It conflicts with clang's -pedantic flag.
llvm-svn: 43431
2007-10-29 03:14:55 +00:00
Chris Lattner
5e99fd8c0d
Add support for the x86-64 'q' regigster modifier, and add support for the
...
b/h/w/k/q inline asm memory modifiers, which are just ignored. This fixes
PR1748 and CodeGen/X86/2007-10-28-inlineasm-q-modifier.ll
llvm-svn: 43430
2007-10-29 03:09:07 +00:00
Anders Carlsson
ceced4ca73
Generate code for __builtin_classify_type.
...
llvm-svn: 43429
2007-10-29 02:59:40 +00:00
Anders Carlsson
7080597adf
Add BuiltinType::Char_S to Type::isCharType
...
llvm-svn: 43428
2007-10-29 02:52:18 +00:00
Chris Lattner
9a641510bd
Fix PR1749 and InstCombine/2007-10-28-EmptyField.ll by handling
...
zero-length fields better.
llvm-svn: 43427
2007-10-29 02:40:02 +00:00
Chris Lattner
4a15e04aee
Fix PR1752 and LoopSimplify/2007-10-28-InvokeCrash.ll: terminators
...
can have uses too. Wouldn't it be nice if invoke didn't exist? :)
llvm-svn: 43426
2007-10-29 02:30:37 +00:00
Ted Kremenek
8be9bc64ce
Fixed assertion in Deserializer::~Deserializer that checks for
...
pointers that were not backpatched (previously checked the wrong invariant).
llvm-svn: 43425
2007-10-28 23:38:38 +00:00
Anton Korobeynikov
9dced3f9ae
Add 'pedantic' mode to verifier rejecting syntactically valid, but 'bad' due to other reasons code
...
llvm-svn: 43424
2007-10-28 22:50:32 +00:00
Ted Kremenek
b6fafb6bf0
Implemented serialization for TypedefType.
...
llvm-svn: 43423
2007-10-28 21:21:04 +00:00
Ted Kremenek
387204749b
Updated backpatching logic during object deserialization to perform
...
eager backpatching instead of waithing until all objects have been
deserialized. This allows us to reduce the memory footprint needed
for backpatching.
llvm-svn: 43422
2007-10-28 21:17:59 +00:00
Duncan Sands
1826deda68
The guaranteed alignment of ptr+offset is only the minimum of
...
of offset and the alignment of ptr if these are both powers of
2. While the ptr alignment is guaranteed to be a power of 2,
there is no reason to think that offset is. For example, if
offset is 12 (the size of a long double on x86-32 linux) and
the alignment of ptr is 8, then the alignment of ptr+offset
will in general be 4, not 8. Introduce a function MinAlign,
lifted from gcc, for computing the minimum guaranteed alignment.
I've tried to fix up everywhere under lib/CodeGen/SelectionDAG/.
I also changed some places that weren't wrong (because both values
were a power of 2), as a defensive change against people copying
and pasting the code.
Hopefully someone who cares about alignment will review the rest
of LLVM and fix up the remaining places. Since I'm on x86 I'm
not very motivated to do this myself...
llvm-svn: 43421
2007-10-28 12:59:45 +00:00
Evan Cheng
c826ac533b
New entry.
...
llvm-svn: 43420
2007-10-28 04:01:09 +00:00
Ted Kremenek
3fd831fd14
Implemented serialization of FunctionTypeProto.
...
llvm-svn: 43419
2007-10-28 00:59:26 +00:00
Ted Kremenek
d33b4adaed
Implemented serialization of FunctionTypeNoProto.
...
llvm-svn: 43418
2007-10-27 19:58:08 +00:00
Ted Kremenek
3e6c227f97
Implemented serialization for VectorType.
...
llvm-svn: 43417
2007-10-27 19:05:09 +00:00
Ted Kremenek
8e8bf5d0bf
More work on type serialization: added support for serializing BuiltinTypes.
...
llvm-svn: 43414
2007-10-26 23:52:52 +00:00
Ted Kremenek
9dd1e702fa
Fixed bug where default SerializeTrait<>::Materialize would not return the materialized object pointer.
...
llvm-svn: 43413
2007-10-26 23:44:59 +00:00
Bill Wendling
2305de81a4
Test to make sure that if we have an unaligned memcpy, it will still compile.
...
llvm-svn: 43412
2007-10-26 23:43:35 +00:00
Fariborz Jahanian
801b63525d
Path to synthesize 'instance' size field of _objc_class metadata.
...
llvm-svn: 43409
2007-10-26 23:09:28 +00:00
Evan Cheng
9dbe99dcd6
A number of LSR fixes:
...
- ChangeCompareStride only reuse stride that is larger than current stride. It
will let the general reuse mechanism to try to reuse a smaller stride.
- Watch out for multiplication overflow in ChangeCompareStride.
- Replace std::set with SmallPtrSet.
llvm-svn: 43408
2007-10-26 23:08:19 +00:00
Ted Kremenek
6698b43389
Completed serialization of ConstantArrayTypes (now that APInt serialization is in place).
...
llvm-svn: 43407
2007-10-26 22:00:08 +00:00
Ted Kremenek
5e7133b090
Added SerializeAPInt.cpp and DeserializeAPInt.cpp to the XCode project.
...
llvm-svn: 43406
2007-10-26 21:53:37 +00:00
Ted Kremenek
2d95094bea
Added serialization support for APInt.
...
llvm-svn: 43405
2007-10-26 21:50:10 +00:00
Steve Naroff
161a92b976
Start rewriting ObjC interfaces. As a start, we comment out all the methods. This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's.
...
llvm-svn: 43404
2007-10-26 20:53:56 +00:00
Fariborz Jahanian
3339d0d14e
This patch allows synthesis generation of ivar offset for legacy objective-c @implementation
...
decl without an @interface decl.
llvm-svn: 43403
2007-10-26 20:50:24 +00:00
Ted Kremenek
18c1393ddb
Fixed incorrect "path name" in preamble (comment) of header file.
...
llvm-svn: 43402
2007-10-26 20:44:02 +00:00
Ted Kremenek
f8555a23ec
Fixed incorrect "path name" in preamble (comment) of header file.
...
llvm-svn: 43401
2007-10-26 20:42:45 +00:00
Bill Wendling
b0bfd69684
On second thought. Remove this as it should never be generated in the first
...
place.
llvm-svn: 43400
2007-10-26 20:34:37 +00:00
Bill Wendling
6d15b32c15
- Remove the hacky code that forces a memcpy. Alignment is taken care of in the
...
FE.
- Explicitly pass in the alignment of the load & store.
- XFAIL 2007-10-23-UnalignedMemcpy.ll because llc has a bug that crashes on
unaligned pointers.
llvm-svn: 43398
2007-10-26 20:24:42 +00:00
Ted Kremenek
16c7d8ce5b
Added skeleton implementation of serialization for types (not complete).
...
llvm-svn: 43397
2007-10-26 20:24:35 +00:00
Ted Kremenek
fc88b1ddb8
Added default implementation of SerializeTrait<> that dispatches to
...
calling member functions of the target type to perform type-specific
serialization.
Added version of ReadPtr that allows passing references to uintptr_t
(useful for smart pointers).
llvm-svn: 43396
2007-10-26 20:23:27 +00:00
Fariborz Jahanian
99e96b0f11
Patch to synthesize computation of Ivar offset in rewritten c file.
...
Thanks to Steve N. to point out using of offsetof for this.
llvm-svn: 43391
2007-10-26 19:46:17 +00:00
Devang Patel
ed93c3c3b3
Codegen union member references.
...
llvm-svn: 43390
2007-10-26 19:42:18 +00:00
Devang Patel
7718d7a2eb
Handle non LValue base expressions.
...
llvm-svn: 43387
2007-10-26 18:15:21 +00:00
Devang Patel
ffdb07c939
Code gen static initializer.
...
llvm-svn: 43386
2007-10-26 17:50:58 +00:00
Devang Patel
8717417b3b
Codegen array initializers.
...
llvm-svn: 43385
2007-10-26 17:44:44 +00:00
Evan Cheng
d78a3e5555
Fix a crash. Make sure TLI is not null.
...
llvm-svn: 43384
2007-10-26 17:24:46 +00:00
Devang Patel
19c2b9a66f
Codegen global array initializers.
...
llvm-svn: 43383
2007-10-26 16:31:40 +00:00
Fariborz Jahanian
22c6a22d76
Pretty printing for ivar list of an interface block.
...
llvm-svn: 43382
2007-10-26 16:29:12 +00:00
Anton Korobeynikov
d07d6a411c
Fix off-by-one stack offset computations (dwarf information) for callee-saved
...
registers in case, when FP pointer was eliminated. This should fixes misc. random
EH-related crahses, when stuff is compiled with -fomit-frame-pointer.
Thanks Duncan for nailing this bug!
llvm-svn: 43381
2007-10-26 09:13:24 +00:00
Eric Christopher
18063916b5
clo/clz aren't supported on mips I. Keep them around for when we'll
...
want them later (mips32/64).
llvm-svn: 43380
2007-10-26 04:00:13 +00:00
Owen Anderson
b7971bbdd7
Make a comment better.
...
llvm-svn: 43379
2007-10-26 03:47:14 +00:00
Gordon Henriksen
78c63ac41e
More fleshing out of docs/Passes.html, plus some typo fixes and
...
improved wording in source files.
llvm-svn: 43377
2007-10-26 03:03:51 +00:00
Evan Cheng
7f3d02471d
Loosen up iv reuse to allow reuse of the same stride but a larger type when truncating from the larger type to smaller type is free.
...
e.g.
Turns this loop:
LBB1_1: # entry.bb_crit_edge
xorl %ecx, %ecx
xorw %dx, %dx
movw %dx, %si
LBB1_2: # bb
movl L_X$non_lazy_ptr, %edi
movw %si, (%edi)
movl L_Y$non_lazy_ptr, %edi
movw %dx, (%edi)
addw $4, %dx
incw %si
incl %ecx
cmpl %eax, %ecx
jne LBB1_2 # bb
into
LBB1_1: # entry.bb_crit_edge
xorl %ecx, %ecx
xorw %dx, %dx
LBB1_2: # bb
movl L_X$non_lazy_ptr, %esi
movw %cx, (%esi)
movl L_Y$non_lazy_ptr, %esi
movw %dx, (%esi)
addw $4, %dx
incl %ecx
cmpl %eax, %ecx
jne LBB1_2 # bb
llvm-svn: 43375
2007-10-26 01:56:11 +00:00
Hartmut Kaiser
1207cd6b1b
Silenced a VC++ warning.
...
llvm-svn: 43374
2007-10-25 23:49:14 +00:00
Ted Kremenek
542e5f29b7
Updated backpatching during object deserialization to support "smart"
...
pointers that employ unused bits in a pointer to store extra data.
llvm-svn: 43373
2007-10-25 23:40:35 +00:00
Hartmut Kaiser
fc69d322f2
Clarified operator precedence.
...
Silenced VC++ warning.
llvm-svn: 43372
2007-10-25 23:15:31 +00:00
Hartmut Kaiser
d57aca25fc
Disambiguated variable name to comply with VC++'s archaic variable scoping rules.
...
llvm-svn: 43371
2007-10-25 22:59:17 +00:00
Hartmut Kaiser
414d7e373e
Updated VC++ build system
...
llvm-svn: 43370
2007-10-25 22:58:31 +00:00
Hartmut Kaiser
7e16ce5270
Disambiguated variable name to comply with VC++'s archaic variable scoping rules.
...
llvm-svn: 43369
2007-10-25 22:57:48 +00:00
Hartmut Kaiser
3a0cda1cf7
Updated VC++ build system
...
llvm-svn: 43368
2007-10-25 22:56:13 +00:00
Evan Cheng
29e29e63bd
Do not rewrite compare instruction using iv of a different stride if the new
...
stride may be rewritten using the stride of the compare instruction.
llvm-svn: 43367
2007-10-25 22:45:20 +00:00
Ted Kremenek
066f60321d
Modified StmtIterator to now include visiting the initialization expression for EnumConstantDecls.
...
llvm-svn: 43366
2007-10-25 22:24:19 +00:00
Devang Patel
b989c9e65c
Fix "strbuf += stufflen;" crash.
...
llvm-svn: 43365
2007-10-25 22:19:13 +00:00
Dale Johannesen
65e804a9c3
Support non-POSIX hosts by removing use of strncasecmp.
...
llvm-svn: 43364
2007-10-25 21:54:43 +00:00
Devang Patel
5ea6d7f1be
Document ConvertNewType() method and make it a private method.
...
llvm-svn: 43363
2007-10-25 21:40:12 +00:00
Ted Kremenek
5749aaedd9
Added DeclSerialization.cpp to XCode project.
...
llvm-svn: 43362
2007-10-25 21:39:10 +00:00
Ted Kremenek
1f1e756483
Added skeleton for Decl serialization.
...
llvm-svn: 43361
2007-10-25 21:37:16 +00:00
Fariborz Jahanian
51f2182338
Refactored several meta data for reusability.
...
Changed the entire rewrite of metadata to write to std::string
object instead of stdout.
llvm-svn: 43360
2007-10-25 20:55:25 +00:00
Bill Wendling
f73340efb9
Changed XXX to FIXME, and added comment to the README file
...
llvm-svn: 43359
2007-10-25 19:49:32 +00:00
Ted Kremenek
a83e6bc246
Added special treatment of serializing NULL pointers.
...
llvm-svn: 43357
2007-10-25 18:42:52 +00:00
Evan Cheng
5a38108374
Remove code that's commented out.
...
llvm-svn: 43356
2007-10-25 18:38:24 +00:00
Devang Patel
29e3824453
Cache llvm::Type through PATypeHolder.
...
llvm-svn: 43355
2007-10-25 18:32:36 +00:00
Ted Kremenek
222211a425
changed #include of Serialization.h to SerializationFwd.h to reduce
...
compilation time.
llvm-svn: 43354
2007-10-25 18:27:10 +00:00
Bill Wendling
5f7ed00d44
Added comment explaining why we are doing this check.
...
llvm-svn: 43353
2007-10-25 18:23:45 +00:00
Ted Kremenek
0cf94e9c91
Created header file to include minimal forward references needed for
...
object serialization.
llvm-svn: 43352
2007-10-25 18:19:29 +00:00
Chris Lattner
991b6b9d0c
typo
...
llvm-svn: 43351
2007-10-25 18:05:29 +00:00
Chris Lattner
76a2273f6e
some minor edits, link to Passes.html, make one point
...
I forgot about yesterday.
llvm-svn: 43350
2007-10-25 17:52:39 +00:00
Chris Lattner
36f81fb065
Fix a recovery bug Fariborz and I noticed yesterday. We were producing:
...
method.c:4:3: error: use of undeclared identifier 'BADIDENT'
&BADIDENT, 0
^
method.c:5:2: error: expected '}'
};
^
method.c:3:14: error: to match this '{'
struct S A = {
^
now we only produce:
method.c:4:3: error: use of undeclared identifier 'BADIDENT'
&BADIDENT, 0
^
llvm-svn: 43349
2007-10-25 17:27:01 +00:00
Chris Lattner
88710ff5b8
simplify change.
...
llvm-svn: 43348
2007-10-25 17:18:59 +00:00
Chris Lattner
94a41ff6c1
Fix a bug steve noticed when handling nested rewrites. We now turn this:
...
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
into:
NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"));
instead of:
NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"))utoreleasePool"), sel_getUid("alloc")) init];
llvm-svn: 43347
2007-10-25 17:17:34 +00:00
Chris Lattner
211f8b8352
Convert one type of metadata to use std::string instead of
...
printf as an example.
llvm-svn: 43346
2007-10-25 17:07:24 +00:00
Ted Kremenek
93345274c2
Added Serialization.h, Serialize.h, Deserialize.h, Serialize.cpp, and
...
Deserialize.cpp to the XCode project.
llvm-svn: 43345
2007-10-25 16:09:09 +00:00
Ted Kremenek
bd8497b011
Added SourceLocation.cpp to XCode project.
...
llvm-svn: 43344
2007-10-25 16:03:53 +00:00
Ted Kremenek
4edcb4d676
Implemented serialization of SourceLocation and SourceRange objects.
...
llvm-svn: 43343
2007-10-25 16:02:43 +00:00
Ted Kremenek
6e64c3f8ec
Added constness to accessors in CompoundStmt.
...
llvm-svn: 43342
2007-10-25 15:39:09 +00:00
Duncan Sands
d385f0759c
Small formatting changes. Add a sanity check.
...
Use NVT rather than looking it up, since we have
it to hand.
llvm-svn: 43341
2007-10-25 12:35:51 +00:00
Duncan Sands
a8f4ba6eb9
Promote SETCC operands.
...
llvm-svn: 43340
2007-10-25 12:32:31 +00:00
Duncan Sands
cf0da03312
Correctly extract the ValueType from a VTSDNode.
...
llvm-svn: 43339
2007-10-25 12:30:51 +00:00
Duncan Sands
7e6e33beab
Fix comment typos.
...
llvm-svn: 43338
2007-10-25 12:28:12 +00:00
Gordon Henriksen
77d27523b1
Fleshing out docs/Passes.html for some analyses.
...
llvm-svn: 43337
2007-10-25 10:18:27 +00:00
Evan Cheng
133694db06
If a loop termination compare instruction is the only use of its stride,
...
and the compaison is against a constant value, try eliminate the stride
by moving the compare instruction to another stride and change its
constant operand accordingly. e.g.
loop:
...
v1 = v1 + 3
v2 = v2 + 1
if (v2 < 10) goto loop
=>
loop:
...
v1 = v1 + 3
if (v1 < 30) goto loop
llvm-svn: 43336
2007-10-25 09:11:16 +00:00
Gordon Henriksen
ac72db5dbe
Passes.html now 'passes' validation.
...
llvm-svn: 43335
2007-10-25 08:58:56 +00:00
Gordon Henriksen
50768f89d9
Bringing Passes.html structurally up-to-date, and enabling
...
semi-automated maintenance.
llvm-svn: 43334
2007-10-25 08:46:12 +00:00
Owen Anderson
4cee0451f0
Fix an obvious typo.
...
llvm-svn: 43333
2007-10-25 06:50:30 +00:00
Owen Anderson
4c209da848
More tutorial cleanups.
...
llvm-svn: 43332
2007-10-25 06:49:29 +00:00
Owen Anderson
af8059c1a7
Add proper footers.
...
llvm-svn: 43331
2007-10-25 06:45:01 +00:00
Owen Anderson
a24e5d6996
Don't bother providing code samples. Maintaining zip files in the repository is a pain.
...
llvm-svn: 43330
2007-10-25 06:41:23 +00:00
Chris Lattner
8b59eafb89
Add chapter 4, feedback appreciated.
...
llvm-svn: 43329
2007-10-25 06:23:36 +00:00
Chris Lattner
f98427142c
remove unimplemented ctor, add some comments.
...
llvm-svn: 43328
2007-10-25 05:19:24 +00:00
Chris Lattner
46b4281b6a
Run the verifier on generated code.
...
llvm-svn: 43327
2007-10-25 04:30:35 +00:00
Owen Anderson
7827a3f366
Fix for PR1741.
...
llvm-svn: 43326
2007-10-25 02:36:18 +00:00
Dale Johannesen
ea839ef1f0
Testcase for PR 1397.
...
llvm-svn: 43323
2007-10-25 00:50:14 +00:00
Chris Lattner
35e564ed09
Add a new ChooseExpr::isConditionTrue method to unify
...
some code.
llvm-svn: 43322
2007-10-25 00:29:32 +00:00
Owen Anderson
00974dce68
Make it possible for DomTreeBase to be constructed from MachineFunction's as well as just Function's.
...
llvm-svn: 43321
2007-10-25 00:16:57 +00:00
Fariborz Jahanian
3df412a6ea
Refactored RewriteObjcMethodsMetaData to better rewrite
...
instance/class methods metadata.
llvm-svn: 43320
2007-10-25 00:14:44 +00:00
Ted Kremenek
d5cb7b055d
Implemented prototype serialization of pointers, including support
...
for backpatching.
Added Deserialize::ReadVal.
llvm-svn: 43319
2007-10-25 00:10:21 +00:00
Ted Kremenek
ed763de6cb
Added accessors to CompoundStmt to retrieve the source locations for the
...
left and right bracket. This is useful for serialization.
llvm-svn: 43318
2007-10-25 00:08:50 +00:00
Devang Patel
e85285b9f3
Remove unused #includes
...
llvm-svn: 43317
2007-10-24 23:42:18 +00:00
Steve Naroff
574440fa58
More work on translating message expressions.
...
Still to do:
- Chris will fix a bug in the rewriting engine for nested stmts. For example, the following:
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
tranlates to:
NSAutoreleasePool * pool = objc_msgSend(objc_msgSend(objc_getClass("NSAutoreleasePool"), sel_getUid("alloc")), sel_getUid("init"))utoreleasePool"), sel_getUid("alloc")) init];
...which is correct, except there is garbage after sel_getUid("init"). This is because the rewriter isn't updating the extent of the containing message expression.
- Do the crazy cast thang.
llvm-svn: 43316
2007-10-24 22:48:43 +00:00
Devang Patel
d68df20620
Handle
...
foo()->a = 42;
llvm-svn: 43315
2007-10-24 22:26:28 +00:00
Dale Johannesen
a4a972e32d
Another expansion for i64 multiply, suitable for PPC.
...
llvm-svn: 43314
2007-10-24 22:26:08 +00:00
Fariborz Jahanian
aa29fb4be8
Remove explicit use of size of known structs in metadata generation.
...
llvm-svn: 43313
2007-10-24 21:25:12 +00:00
Dale Johannesen
52bbe1b171
This was failing on Darwin, which defaults to PIC;
...
no lea was generated. I think this follows the intent.
llvm-svn: 43312
2007-10-24 20:58:14 +00:00
Fariborz Jahanian
486f718f14
Couple of minor changes. 1) Metaclass metadata also has a reference to
...
protocol meta-data (unlike what documentation says). 2) Include objc.h so,
we can compile the generated metadata with both gcc and clang.
llvm-svn: 43311
2007-10-24 20:54:23 +00:00
Devang Patel
bc50aab635
Move RecordOrganizer into CodeGenTypes.cpp
...
llvm-svn: 43310
2007-10-24 20:38:06 +00:00
Dale Johannesen
4d06391c47
Fix off by 1 bug in printf->puts lowering.
...
llvm-svn: 43309
2007-10-24 20:14:50 +00:00
Fariborz Jahanian
b2f525dabc
Refactord instance and class metadata emission. Refactored protocols metadata emission.
...
Implemented emission of category metadata,
llvm-svn: 43308
2007-10-24 19:23:36 +00:00
Ted Kremenek
83610ae6f4
Split Serialization.h into separate headers: Serialize.h and
...
Deserialize.h Serialization.h now includes trait speciailizations for
unsigned long, etc.
llvm-svn: 43307
2007-10-24 19:06:40 +00:00
Ted Kremenek
37a3275919
Modified current clients of Bitcode-Object serialization to use the
...
new split-header file configuration (Serialize.h and Deserialize.h)
now in place in the core LLVM repository.
Removed unneeded SerializeTrait specializations for enums in
TokenKinds.h
llvm-svn: 43306
2007-10-24 19:06:02 +00:00
Chris Lattner
55b8302dfe
simplify some code by using the new isNaN predicate
...
llvm-svn: 43305
2007-10-24 18:54:45 +00:00
Chris Lattner
b6ed689722
add a nice predicate to check to see if nan
...
llvm-svn: 43304
2007-10-24 18:54:28 +00:00
Devang Patel
b67e596d86
Handle non-constant initializers.
...
llvm-svn: 43301
2007-10-24 18:05:48 +00:00
Devang Patel
43fc86d0f2
Visit CompoundLiteralExpr and InitListExpr
...
llvm-svn: 43300
2007-10-24 17:18:43 +00:00
Chris Lattner
3c799d7e9a
Fix some long lines, move code around into logical groups.
...
llvm-svn: 43299
2007-10-24 17:06:59 +00:00
Chris Lattner
6953469880
Use Ted's new mutable child iterators to update the tree as we rewrite it.
...
This will make nested subexprs work.
llvm-svn: 43296
2007-10-24 16:57:36 +00:00
Ted Kremenek
38f87dd9d0
Modified operator* for StmtIterator to return Stmt*& instead of Stmt*.
...
This permits in-place replacement of the original AST statements.
llvm-svn: 43295
2007-10-24 16:52:34 +00:00
Owen Anderson
544f860f59
Update Makefile to use simpler llvm-config parameters.
...
llvm-svn: 43292
2007-10-24 16:06:42 +00:00
Owen Anderson
4c9dbd1e9f
Update Makefile to use simpler llvm-config parameters.
...
llvm-svn: 43291
2007-10-24 16:04:08 +00:00
Chris Lattner
0083d8f38d
switch some calls to SelectionDAG::getTargetNode to use
...
the one that takes an operand list instead of explicit
operands. There is one left though, the more interesting
one :)
llvm-svn: 43290
2007-10-24 06:25:09 +00:00
Chris Lattner
c62877e9da
Implement a couple of foldings for ordered and unordered comparisons,
...
implementing cases related to PR1738.
llvm-svn: 43289
2007-10-24 05:38:08 +00:00
Chris Lattner
9a760ebf32
further simplify run options, thanks to gordonh for pointing this out
...
llvm-svn: 43288
2007-10-24 05:09:48 +00:00
Chris Lattner
1fb0d5df69
Fix instructions now that PR1739 is fixed.
...
llvm-svn: 43287
2007-10-24 04:37:23 +00:00
Chris Lattner
4c9ec1aaa2
Fix PR1739.
...
llvm-svn: 43286
2007-10-24 04:35:54 +00:00
Steve Naroff
c77380b46f
Incorporate some feedback from Chris...
...
llvm-svn: 43285
2007-10-24 01:09:48 +00:00
Devang Patel
ea37aa7d64
Constify methods and reuse RecordOrganizer object.
...
llvm-svn: 43284
2007-10-24 00:56:23 +00:00
Devang Patel
790afb0444
check base type.
...
llvm-svn: 43283
2007-10-24 00:54:17 +00:00
Devang Patel
f2423473b1
Add notes.
...
llvm-svn: 43282
2007-10-24 00:32:16 +00:00
Devang Patel
e531ae687a
Use isUnionType() predicate.
...
llvm-svn: 43281
2007-10-24 00:28:49 +00:00
Devang Patel
c4e224e59c
untabify
...
llvm-svn: 43280
2007-10-24 00:26:24 +00:00
Hartmut Kaiser
1759e27951
Added VC++ solution file allowing to build clang.
...
llvm-svn: 43279
2007-10-24 00:13:40 +00:00
Hartmut Kaiser
5277af121a
Fixed a strange construct, please review.
...
llvm-svn: 43278
2007-10-24 00:07:36 +00:00
Hartmut Kaiser
d37ea4f6ed
Silenced a VC++ warning.
...
llvm-svn: 43277
2007-10-24 00:06:59 +00:00
Hartmut Kaiser
36309e56eb
Silenced a VC++ warning.
...
llvm-svn: 43276
2007-10-24 00:06:31 +00:00
Hartmut Kaiser
f8b2612b0c
Updated VC++ build system
...
llvm-svn: 43275
2007-10-23 23:57:01 +00:00
Steve Naroff
db1ab1c2b0
Add some plumbing to rewrite message expressions (still under construction).
...
llvm-svn: 43274
2007-10-23 23:50:29 +00:00
Bill Wendling
38ccabcae9
Fix comment and use the "Size" variable that's already provided.
...
llvm-svn: 43271
2007-10-23 23:36:57 +00:00
Bill Wendling
e3b859298a
If there's an unaligned memcpy to/from the stack, don't lower it. Just call the
...
memcpy library function instead.
llvm-svn: 43270
2007-10-23 23:32:40 +00:00
Devang Patel
61eaea88f8
Fix typo.
...
llvm-svn: 43269
2007-10-23 23:29:51 +00:00
Devang Patel
65c4afb940
Handle nested structs.
...
typdef struct A { int i; struct A *next; } A
llvm-svn: 43268
2007-10-23 23:26:46 +00:00
Dale Johannesen
10f4152471
Disable a couple more things for ppcf128.
...
llvm-svn: 43267
2007-10-23 23:20:14 +00:00
Ted Kremenek
f25f4a3de0
Implemented serialization for IdentifierInfo and IdentifierTable.
...
Updated serialization test code in the driver to test serialization of
these types.
llvm-svn: 43266
2007-10-23 22:18:37 +00:00
Ted Kremenek
97e3be7995
Added "ReadEnum" and "WriteEnum" to serialization classes.
...
llvm-svn: 43265
2007-10-23 22:17:03 +00:00
Bill Wendling
6f149c0571
This broke lots. Reverting.
...
llvm-svn: 43264
2007-10-23 22:04:26 +00:00
Owen Anderson
39b52ee00b
Make DomTreeBase not a FunctionPass.
...
llvm-svn: 43263
2007-10-23 21:42:49 +00:00
Bill Wendling
8971440e56
Lowering a memcpy to the stack is killing PPC. The ARM and X86 backends already
...
have their own custom memcpy lowering code. This code needs to be factored out
into a target-independent lowering method with hooks to the backend. In the
meantime, just call memcpy if we're trying to copy onto a stack.
llvm-svn: 43262
2007-10-23 21:30:25 +00:00
Ted Kremenek
bd3501887f
Added preliminary implementation of generic object serialization to bitcode.
...
llvm-svn: 43261
2007-10-23 21:29:33 +00:00
Owen Anderson
4ca0ca7e64
Unbreak the build. Forgot to commit this file.
...
llvm-svn: 43260
2007-10-23 21:04:37 +00:00
Owen Anderson
9c614117da
Make DomTree and PostDomTree thin wrappers around DomTreeBase, rather than inheriting from it.
...
llvm-svn: 43259
2007-10-23 20:58:37 +00:00
Devang Patel
30efa2eec9
Handle simple struct member expr.
...
llvm-svn: 43258
2007-10-23 20:28:39 +00:00
Steve Naroff
e670dbb9e6
- Add rewrite rule for @class.
...
- Add setter/getter to ObjcClassDecl.
- Predefined key runtime functions.
llvm-svn: 43257
2007-10-23 20:20:08 +00:00
Evan Cheng
5d7032bb08
It's possible to commute instrctions with more than 3 operands.
...
llvm-svn: 43256
2007-10-23 20:14:40 +00:00
Fariborz Jahanian
f3d5a54722
Patch to complete metadata generation for each implemented class.
...
llvm-svn: 43255
2007-10-23 18:53:48 +00:00
Chris Lattner
07ae732cc4
new testcase
...
llvm-svn: 43252
2007-10-23 18:07:23 +00:00
Chris Lattner
788f0d340a
llvm/test programs should not be execution programs. This
...
will hopefully fix Gabor's Sparc problem.
llvm-svn: 43251
2007-10-23 17:56:04 +00:00
Evan Cheng
847d42a85c
isSubRegOf() is a dup of isSubRegister.
...
llvm-svn: 43249
2007-10-23 06:51:50 +00:00
Evan Cheng
ec271b104c
Temporary solution: added a different set of BCTRL_Macho / BCTRL_ELF with right callee-saved defs set for ppc64.
...
llvm-svn: 43248
2007-10-23 06:42:42 +00:00
Chris Lattner
c3def1530a
Fix validation problems, which were somewhat ironically in the "valid html" button code :)
...
llvm-svn: 43247
2007-10-23 06:30:50 +00:00
Chris Lattner
e9b16ec28a
add a skeleton for part 4
...
llvm-svn: 43246
2007-10-23 06:27:55 +00:00
Chris Lattner
a02ab559a1
complete the codegen chapter
...
llvm-svn: 43245
2007-10-23 06:23:57 +00:00
Owen Anderson
b5d8904909
Now with valid HTML 4.01!
...
llvm-svn: 43244
2007-10-23 06:22:21 +00:00
Owen Anderson
3ee597e34a
Add a link to the "writing an optimization" tutorial.
...
llvm-svn: 43243
2007-10-23 06:17:39 +00:00
Owen Anderson
c4bb8c75ca
Add downloadable code sample for tutorial 2.
...
llvm-svn: 43242
2007-10-23 06:05:37 +00:00
Owen Anderson
299be453b5
Add the second of the "basic topics" tutorials.
...
llvm-svn: 43241
2007-10-23 06:03:24 +00:00
Owen Anderson
9e87698ec1
Reorder the optimization and bitcode tutorials.
...
llvm-svn: 43240
2007-10-23 06:02:14 +00:00
Chris Lattner
61353b41df
Fix up a broken #include, move code to its own section, add conclusions.
...
llvm-svn: 43239
2007-10-23 05:43:01 +00:00
Chris Lattner
93b76e0c60
Finish up expr codegen.
...
llvm-svn: 43238
2007-10-23 04:51:30 +00:00
Chris Lattner
61b4ec70aa
several improvements suggested by Dan, thanks!
...
llvm-svn: 43237
2007-10-23 04:27:44 +00:00
Devang Patel
3e11ccea96
Begin struct layout work.
...
llvm-svn: 43236
2007-10-23 02:10:49 +00:00
Fariborz Jahanian
d752eae488
Patch for initialization of class's Meta-class metadata.
...
llvm-svn: 43235
2007-10-23 00:02:02 +00:00
Evan Cheng
1f2dd35898
Fix memcpy lowering when addresses are 4-byte aligned but size is not multiple of 4.
...
llvm-svn: 43234
2007-10-22 22:11:27 +00:00
Fariborz Jahanian
6eafb030f0
This patch generates protocol metadata and all its sub-metadata.
...
llvm-svn: 43233
2007-10-22 21:41:37 +00:00
Dan Gohman
d09f1c40a2
The #include <iterator> isn't needed in this header.
...
llvm-svn: 43232
2007-10-22 20:44:10 +00:00
Dan Gohman
e0c3d9f338
Strength reduction improvements.
...
- Avoid attempting stride-reuse in the case that there are users that
aren't addresses. In that case, there will be places where the
multiplications won't be folded away, so it's better to try to
strength-reduce them.
- Several SSE intrinsics have operands that strength-reduction can
treat as addresses. The previous item makes this more visible, as
any non-address use of an IV can inhibit stride-reuse.
- Make ValidStride aware of whether there's likely to be a base
register in the address computation. This prevents it from thinking
that things like stride 9 are valid on x86 when the base register is
already occupied.
Also, XFAIL the 2007-08-10-LEA16Use32.ll test; the new logic to avoid
stride-reuse elimintes the LEA in the loop, so the test is no longer
testing what it was intended to test.
llvm-svn: 43231
2007-10-22 20:40:42 +00:00
Dan Gohman
bf474959a3
Fix the folding of multiplication into addresses on x86, which was broken
...
by the recent {U,S}MUL_LOHI changes.
llvm-svn: 43230
2007-10-22 20:22:24 +00:00
Evan Cheng
bdbed66333
Use ptr type in the immediate field of a BxA instruction so we don't end up selecting 32-bit call instruction for ppc64.
...
llvm-svn: 43228
2007-10-22 19:46:19 +00:00
Evan Cheng
5163a8f53e
Add missing paratheses.
...
llvm-svn: 43227
2007-10-22 19:42:28 +00:00
Chris Lattner
fee916334a
add a 'don't use me' marker.
...
llvm-svn: 43226
2007-10-22 19:41:46 +00:00
Duncan Sands
941db4da0a
Support for expanding extending loads of integers with
...
funky bit-widths.
llvm-svn: 43225
2007-10-22 19:00:05 +00:00
Dan Gohman
a37eaf2bf9
Move the SCEV object factors from being static members of the individual
...
SCEV subclasses to being non-static member functions of the ScalarEvolution
class.
llvm-svn: 43224
2007-10-22 18:31:58 +00:00
Duncan Sands
8fc995069b
Fix up the logic for result expanding the various extension
...
operations so they work right for integers with funky
bit-widths. For example, consider extending i48 to i64
on a 32 bit machine. The i64 result is expanded to 2 x i32.
We know that the i48 operand will be promoted to i64, then
also expanded to 2 x i32. If we had the expanded promoted
operand to hand, then expanding the result would be trivial.
Unfortunately at this stage we can only get hold of the
promoted operand. So instead we kind of hand-expand, doing
explicit shifting and truncating to get the top and bottom
halves of the i64 operand into 2 x i32, which are then used
to expand the result. This is harmless, because when the
promoted operand is finally expanded all this bit fiddling
turns into trivial operations which are eliminated either
by the expansion code itself or the DAG combiner.
llvm-svn: 43223
2007-10-22 18:26:21 +00:00
Chris Lattner
ce2c3a456f
fit in 80 cols :)
...
llvm-svn: 43222
2007-10-22 16:44:31 +00:00
Chris Lattner
560762d118
start of chapter 3
...
llvm-svn: 43221
2007-10-22 07:01:42 +00:00
Owen Anderson
c2b2fc0a26
Fix a few typos I noticed.
...
llvm-svn: 43220
2007-10-22 06:48:28 +00:00
Owen Anderson
3295cfde98
Add downloadable code samples.
...
llvm-svn: 43219
2007-10-22 06:35:07 +00:00
Chris Lattner
3a48708c91
Check in part 2: parser and ast.
...
llvm-svn: 43218
2007-10-22 06:34:15 +00:00
Owen Anderson
bbed04336c
Fix some code to make it actually work.
...
llvm-svn: 43217
2007-10-22 06:29:31 +00:00
Bill Wendling
8830ffed4c
Put correct link in example
...
llvm-svn: 43216
2007-10-22 05:10:05 +00:00
Chris Lattner
5e0f459da6
add part 1, review appreciated.
...
llvm-svn: 43215
2007-10-22 04:32:37 +00:00
Chris Lattner
5e63999d71
add an outline for "part 2".
...
llvm-svn: 43214
2007-10-22 03:19:07 +00:00
Chris Lattner
c14c8cd1a7
rename tutorial 1 -> JITTutorial1, make unimplemented links not be dead links.
...
llvm-svn: 43213
2007-10-22 03:12:24 +00:00
Evan Cheng
c92446af1f
Fix an unfolding bug.
...
llvm-svn: 43212
2007-10-22 03:03:20 +00:00
Evan Cheng
8557603781
- Only perform the unfolding optimization when the folding in question is modref.
...
- Remove a bogus assertion.
llvm-svn: 43211
2007-10-22 03:01:44 +00:00
Chris Lattner
fd6f3257b8
add a mechanism for the JIT to invoke a function to lazily create functions as they are referenced.
...
llvm-svn: 43210
2007-10-22 02:50:12 +00:00
Chris Lattner
bf5e958ba0
llvm-gcc3 is dead, along with it __main.
...
llvm-svn: 43209
2007-10-22 02:39:47 +00:00
Anton Korobeynikov
7499a3b092
Reg2Mem cleanup and optimizations:
...
- enable phi instructions demotion to stack
- create alloca instructions in the entry block
llvm-svn: 43208
2007-10-21 23:05:16 +00:00
Chris Lattner
edaf0b4651
LoadLibraryPermanently doesn't throw.
...
llvm-svn: 43207
2007-10-21 22:58:11 +00:00
Chris Lattner
b5163bb9f0
Add a convenience method for creating EE's.
...
llvm-svn: 43206
2007-10-21 22:57:11 +00:00
Dale Johannesen
8ee70112ea
Allow for copysign having f80 second argument.
...
Fixes 5550319.
llvm-svn: 43205
2007-10-21 01:07:44 +00:00
Chris Lattner
36f06c80e6
Add promote operand support for [su]int_to_fp.
...
llvm-svn: 43204
2007-10-20 22:57:56 +00:00
Owen Anderson
18be874e67
Some improvements based on feedback from Anders.
...
llvm-svn: 43203
2007-10-20 06:12:33 +00:00
Owen Anderson
9f2be01f86
Fix some weird indenting in code.
...
llvm-svn: 43202
2007-10-20 05:41:39 +00:00
Owen Anderson
f747ab10fb
Use getOrInsertFunction() in tutorial 1. This makes for shorter, simpler, and better example code.
...
llvm-svn: 43201
2007-10-20 05:40:47 +00:00
Owen Anderson
b207ff2c18
Add the beginnings of an LLVM tutorial. If anyone has suggestions, comments,
...
or would like to contribute, let me know!
llvm-svn: 43200
2007-10-20 05:23:06 +00:00
Chris Lattner
2ba4b148f3
Add result promotion of FP_TO_*INT, fixing CodeGen/X86/trunc-to-bool.ll
...
with the new legalizer.
llvm-svn: 43199
2007-10-20 04:32:38 +00:00
Chris Lattner
1c87f0c620
simplify some code.
...
llvm-svn: 43198
2007-10-20 04:09:48 +00:00
Chris Lattner
2bcac640b7
Implement promote and expand for operands of memcpy and friends.
...
This fixes CodeGen/X86/mem*.ll.
llvm-svn: 43197
2007-10-20 04:07:07 +00:00
Evan Cheng
f12967124c
Added missing curly braces which renders the if clause useless in debug build.
...
llvm-svn: 43196
2007-10-20 04:01:47 +00:00
Dale Johannesen
771188cf60
Fix a few places vector operations were not getting
...
the operand's type from the right place.
llvm-svn: 43195
2007-10-20 00:07:52 +00:00
Evan Cheng
45e096c77e
Resolve unfold tables ambiguity.
...
llvm-svn: 43194
2007-10-19 23:50:58 +00:00
Evan Cheng
f52a6fc50c
New test case.
...
llvm-svn: 43193
2007-10-19 22:05:00 +00:00
Evan Cheng
35ff79370b
Local spiller optimization:
...
Turn a store folding instruction into a load folding instruction. e.g.
xorl %edi, %eax
movl %eax, -32(%ebp)
movl -36(%ebp), %eax
orl %eax, -32(%ebp)
=>
xorl %edi, %eax
orl -36(%ebp), %eax
mov %eax, -32(%ebp)
This enables the unfolding optimization for a subsequent instruction which will
also eliminate the newly introduced store instruction.
llvm-svn: 43192
2007-10-19 21:23:22 +00:00
Bill Wendling
ac5c93040f
Don't branch fold inline asm statements.
...
llvm-svn: 43191
2007-10-19 21:09:55 +00:00
Duncan Sands
a87c9e4b75
Add support for a few more nodes.
...
llvm-svn: 43190
2007-10-19 20:29:48 +00:00
Dale Johannesen
6802d0c96f
Redo "last ppc long double fix" as Chris wants.
...
llvm-svn: 43189
2007-10-19 20:29:00 +00:00
Chris Lattner
8beb9dee0e
Fix a crash on test/Sema/invalid-decl.c
...
llvm-svn: 43188
2007-10-19 20:10:30 +00:00
Bill Wendling
b5bc897864
Removed "-arch i386" by popular demand...
...
llvm-svn: 43186
2007-10-19 18:49:16 +00:00
Bill Wendling
5f1a253a3f
Now with RUN line!
...
llvm-svn: 43185
2007-10-19 18:40:53 +00:00
Bill Wendling
89151b1f0a
Remove the Foundation.h file because not everyone has that.
...
llvm-svn: 43184
2007-10-19 18:36:04 +00:00
Devang Patel
c0ced49a14
This test now passes.
...
llvm-svn: 43183
2007-10-19 17:11:01 +00:00
Anton Korobeynikov
f93fa13de7
Update this file for 2.0 syntax. Contributed by Jan Rehders
...
llvm-svn: 43182
2007-10-19 16:54:13 +00:00
Chris Lattner
064c31ebac
Fix a really nasty vector miscompilation bill recently introduced.
...
llvm-svn: 43181
2007-10-19 16:47:35 +00:00
Hartmut Kaiser
321be0cd86
Updated VC++ build system
...
llvm-svn: 43180
2007-10-19 15:51:20 +00:00
Hartmut Kaiser
b5371d22eb
Silenced a VC++ warning.
...
llvm-svn: 43179
2007-10-19 15:50:35 +00:00
Gabor Greif
24032f1ac2
add NL at end of file
...
llvm-svn: 43178
2007-10-19 15:38:32 +00:00
Chris Lattner
3ea519e56d
rename ExpandOperation to ExpandOperationResult, as suggested
...
by Duncan
llvm-svn: 43177
2007-10-19 15:28:47 +00:00
Rafael Espindola
18a831d783
split LowerMEMCPY into LowerMEMCPYCall and LowerMEMCPYInline in the ARM backend.
...
llvm-svn: 43176
2007-10-19 14:35:17 +00:00
Duncan Sands
a9953e4d0a
Support for expanding ADDE and SUBE.
...
llvm-svn: 43175
2007-10-19 13:06:17 +00:00
Duncan Sands
d9834b29dd
If the value types are equal then this routine
...
asserts in later checks rather than producing
the ordinary load it is supposed to. Avoid all
such hassles by directly returning an ordinary
load in this case.
llvm-svn: 43174
2007-10-19 13:05:40 +00:00
Rafael Espindola
813a0b1d29
Test byval with a 8 bit aligned struct
...
llvm-svn: 43173
2007-10-19 11:29:21 +00:00
Rafael Espindola
846c19dd70
Add support for byval function whose argument is not 32 bit aligned.
...
To do this it is necessary to add a "always inline" argument to the
memcpy node. For completeness I have also added this node to memmove
and memset. I have also added getMem* functions, because the extra
argument makes it cumbersome to use getNode and because I get confused
by it :-)
llvm-svn: 43172
2007-10-19 10:41:11 +00:00
Chris Lattner
e5a6448533
Implement a few new operations.
...
llvm-svn: 43171
2007-10-19 04:46:45 +00:00
Chris Lattner
e31365eecc
Implement expansion of SINT_TO_FP and UINT_TO_FP operands.
...
llvm-svn: 43170
2007-10-19 04:32:47 +00:00
Chris Lattner
9081d08083
implement support for custom expansion of any node type, in one place.
...
llvm-svn: 43169
2007-10-19 04:14:36 +00:00
Chris Lattner
b193576bc6
comment fixes
...
llvm-svn: 43168
2007-10-19 04:08:28 +00:00
Chris Lattner
d01b8ea4a5
Make use of TLI.ExpandOperation, remove softfloat stuff.
...
llvm-svn: 43167
2007-10-19 03:58:25 +00:00
Chris Lattner
3c7ee41c78
add expand support for bit_convert result, even allowing custom expansion.
...
llvm-svn: 43166
2007-10-19 03:33:14 +00:00
Chris Lattner
579db81f1c
add a new target hook.
...
llvm-svn: 43165
2007-10-19 03:31:45 +00:00
Chris Lattner
5d979d57ae
Add an easy microoptimization I noticed.
...
llvm-svn: 43164
2007-10-19 03:29:26 +00:00
Devang Patel
e1b7fa3410
New test.
...
llvm-svn: 43162
2007-10-19 01:28:02 +00:00
Bill Wendling
de16ad1446
Negative indices aren't allowed here.
...
llvm-svn: 43161
2007-10-19 01:10:49 +00:00
Dale Johannesen
10432e5a67
More ppcf128 issues (maybe the last)?
...
llvm-svn: 43160
2007-10-19 00:59:18 +00:00
Fariborz Jahanian
74a1cfaf21
rewrite of metadata for implemented instance methods.
...
llvm-svn: 43159
2007-10-19 00:36:46 +00:00
Steve Naroff
648e029a3d
Include a simple test case for the previous commit...
...
llvm-svn: 43158
2007-10-19 00:05:15 +00:00
Steve Naroff
684dc4107f
Fix the previous (short lived:-) FIXME.
...
I didn't realize that GCC considers this a hard error (I thought it was built-in).
Since it's not, we should simply emit an error.
[dylan:~/llvm/tools/clang] admin% cc -c trivial.m
trivial.m:6: error: cannot find interface declaration for 'NSConstantString'
[administrators-powerbook59:~/llvm/tools/clang] admin% ../../Debug/bin/clang trivial.m
trivial.m:6:16: error: cannot find interface declaration for 'NSConstantString'
NSString *s = @"123";
^
1 diagnostic generated.
llvm-svn: 43157
2007-10-18 23:53:51 +00:00
Ted Kremenek
04746ce6f9
Fixed DeclStmt::child_begin() to actually create an iterator that
...
visits its decls, rather than just creating an "end()" iterator.
Fixed child_end() for statements and expressions to use
child_iterator() to create the end() iterator, rather than just
returning NULL.
Fixed bug in StmtIterator where we did not correctly detect if we had
marched off the end of the ScopedDecls.
llvm-svn: 43156
2007-10-18 23:28:49 +00:00
Fariborz Jahanian
e183a8259d
Check for Nullness of value built in GetObjcProtoType.
...
llvm-svn: 43155
2007-10-18 22:59:23 +00:00
Ted Kremenek
efc244722f
Minor grammar fix.
...
llvm-svn: 43154
2007-10-18 22:50:52 +00:00
Evan Cheng
463e2ab0ac
- Added getOpcodeAfterMemoryUnfold(). It doesn't unfold an instruction, but only returns the opcode of the instruction post unfolding.
...
- Fix some copy+paste bugs.
llvm-svn: 43153
2007-10-18 22:40:57 +00:00
Steve Naroff
eee59ebb15
Add a FIXME to an assert.
...
Change a dyn_cast_or_null back to cast (which is more efficient).
llvm-svn: 43152
2007-10-18 22:17:45 +00:00
Fariborz Jahanian
c34409c281
Patch to rewrite ivar tables metadata for classes defined.
...
llvm-svn: 43151
2007-10-18 22:09:03 +00:00
Evan Cheng
aa9a225699
Use SmallVectorImpl instead of SmallVector with hardcoded size in MRegister public interface.
...
llvm-svn: 43150
2007-10-18 21:29:24 +00:00
Chris Lattner
0d466153b9
remove dead #include
...
llvm-svn: 43149
2007-10-18 21:23:00 +00:00
Devang Patel
df49cf52e2
Try again.
...
Instead of loading small global string from memory, use
integer constant.
llvm-svn: 43148
2007-10-18 19:52:32 +00:00
Owen Anderson
09b83ba6f1
Allow GVN to eliminate redundant calls to functions without side effects.
...
llvm-svn: 43147
2007-10-18 19:39:33 +00:00
Christopher Lamb
64035f3b8e
Add an uppercase conversion utility function.
...
llvm-svn: 43146
2007-10-18 19:31:38 +00:00
Christopher Lamb
79dfbed6f6
Fix a misnamed parameter.
...
llvm-svn: 43145
2007-10-18 19:29:45 +00:00
Christopher Lamb
7f68cf0d57
Fix a typo
...
llvm-svn: 43144
2007-10-18 19:28:55 +00:00
Fariborz Jahanian
93191afdef
First patch toward rewriting of objective-c's meta data.
...
llvm-svn: 43143
2007-10-18 19:23:00 +00:00
Steve Naroff
1bb21df47f
Tweak a recent fix to UsualArithmeticConversions (made by Chris - r43113). The benefit of this tweak is it guarantees the entire routine operates on unqualified types (which I believe is a bit clearer).
...
llvm-svn: 43142
2007-10-18 18:55:53 +00:00
Chris Lattner
9715d9fb59
Fix PR1735 and Transforms/DeadArgElim/2007-10-18-VarargsReturn.ll by
...
fixing some obviously broken code :(
llvm-svn: 43141
2007-10-18 18:49:29 +00:00
Bill Wendling
5616a608df
Fix the command line.
...
llvm-svn: 43140
2007-10-18 18:26:40 +00:00
Ted Kremenek
0f39de13a0
Added StmtIterator.cpp and StmtIterator.h to the XCode project.
...
llvm-svn: 43139
2007-10-18 18:22:01 +00:00
Ted Kremenek
2ba761c7b8
Refactored StmtIterator into classes StmtIteratorBase (non-templated)
...
and StmtIteratorImpl (templated), which StmtIterator and
ConstStmtIterator now succintly subclass.
Implemented iteration over the initializers in DeclStmts. This is not
thoroughly tested, so there may be bugs.
llvm-svn: 43138
2007-10-18 18:19:31 +00:00
Ted Kremenek
614d84aab3
Replaced virtual method call to child_begin() in child_end() by
...
directly inlining its logic.
llvm-svn: 43137
2007-10-18 18:17:43 +00:00
Devang Patel
371a5ef1de
Fix test.
...
llvm-svn: 43136
2007-10-18 17:54:49 +00:00
Chris Lattner
ef6500992f
this doesn't need dynamic_cast.
...
llvm-svn: 43133
2007-10-18 16:26:24 +00:00
Ted Kremenek
7aef89101d
Fixed broken build.
...
llvm-svn: 43132
2007-10-18 16:25:40 +00:00
Chris Lattner
7813cec0d0
remove dead file
...
llvm-svn: 43131
2007-10-18 16:12:54 +00:00
Chris Lattner
9afb8e4e29
Reduce reliance on rtti info
...
llvm-svn: 43130
2007-10-18 16:11:18 +00:00
Chris Lattner
9b6ec77647
fix typo
...
llvm-svn: 43129
2007-10-18 16:10:48 +00:00
Chris Lattner
b12dce4bce
update comment.
...
llvm-svn: 43128
2007-10-18 16:10:17 +00:00
Chris Lattner
1b88e3c2dd
This requires rtti info because tblgen uses commandline,
...
and tblgen requires rtti.
llvm-svn: 43127
2007-10-18 15:57:29 +00:00
Chris Lattner
604b2314c8
tblgen uses dynamic_cast heavily, so it needs rtti info
...
llvm-svn: 43126
2007-10-18 15:54:45 +00:00
Hartmut Kaiser
c8107e54d5
Silenced a couple of VC++ warnings.
...
llvm-svn: 43125
2007-10-18 12:47:01 +00:00
Hartmut Kaiser
597e172d0a
Updated VC++ build system
...
llvm-svn: 43124
2007-10-18 12:32:10 +00:00
Hartmut Kaiser
a420cf3f77
Updated VC++ build system
...
llvm-svn: 43123
2007-10-18 12:31:51 +00:00
Gordon Henriksen
ea31de8dc1
Work around downrev gccs which do not inherit visibility of the
...
Registry<>::iterator member class.
llvm-svn: 43122
2007-10-18 11:53:05 +00:00
Gordon Henriksen
03368e85b8
Missing 'public' keyword.
...
llvm-svn: 43121
2007-10-18 11:31:21 +00:00
Bill Wendling
070aca5d25
Pointer arithmetic should be done with the index the same size as the pointer.
...
llvm-svn: 43120
2007-10-18 08:32:37 +00:00
Duncan Sands
cb7aca0dcb
Support for ADDC/SUBC.
...
llvm-svn: 43119
2007-10-18 08:22:16 +00:00
Evan Cheng
e6a41c066a
Really fix PR1734. Carefully track which register uses are sub-register uses by
...
traversing inverse register coalescing map.
llvm-svn: 43118
2007-10-18 07:49:59 +00:00
Evan Cheng
0b18ddf55a
Remove unnecessary include.
...
llvm-svn: 43117
2007-10-18 07:47:55 +00:00
Chris Lattner
84f3461c49
legalizing the ret operation on f64 shouldn't introduce a new
...
i64 bit convert needlessly.
llvm-svn: 43116
2007-10-18 06:17:07 +00:00
Owen Anderson
ca831a829d
Move Split<...>() into DomTreeBase. This should make the #include's of DominatorInternals.h
...
in CodeExtractor and LoopSimplify unnecessary.
Hartmut, could you confirm that this fixes the issues you were seeing?
llvm-svn: 43115
2007-10-18 05:13:52 +00:00
Steve Naroff
a78c464c9e
Fix a bug in Sema::CheckConditionalOperands(). When mixing pointers and null pointer constants, we need to promote the null pointer constant (which is an integer) to the pointer type. Test case is self explanatory.
...
This surfaced yesterday, when compiling test/Sema/cocoa.m on Leopard. Since this has nothing to do with ObjC, it's kind of bizarre this hasn't shown up before. I imagine Cocoa.h on Leopard may have changed recently?
Thanks to Ted for localizing the bug and giving me a useful AST dump...
llvm-svn: 43114
2007-10-18 05:13:08 +00:00
Chris Lattner
fac7ac4130
UsualArithmeticConversions is crashing with an assert
...
when comparing "float" and "const float". This "fixes" the
issue, but may not be the right fix. Steve, please review.
Testcase here: test/Sema/usual-float.c
llvm-svn: 43113
2007-10-18 03:50:33 +00:00
Steve Naroff
8569d77349
Fix the following bug...
...
unsigned char asso_values[] = { 34 };
int legal2() {
return asso_values[0];
}
The code that creates the new constant array type was operating on the original type.
As a result, the constant type being generated was "unsigned char [1][]" (which is wrong).
The fix is to operate on the element type - in this case, the correct type is "unsigned char [1]"
I added this case to array-init.c, which clearly didn't catch this bogosity...
llvm-svn: 43112
2007-10-18 03:27:23 +00:00
Devang Patel
9497767458
XFAIL for now.
...
llvm-svn: 43111
2007-10-18 00:48:43 +00:00
Chris Lattner
c7f3981b27
remove extraneous space in @selector()
...
llvm-svn: 43110
2007-10-18 00:39:29 +00:00
Chris Lattner
810c1db3f5
remove typedef.
...
llvm-svn: 43109
2007-10-18 00:38:23 +00:00
Ted Kremenek
da9639d1a7
Changed the return type of type-specific Allocate() methods to return
...
void*. This is hint that we are returning uninitialized memory rather
than a constructed object.
Patched ImutAVLTree to conform to this new interface.
llvm-svn: 43106
2007-10-18 00:30:14 +00:00
Ted Kremenek
336886a344
Implemented 90% functionality of new child_iterator for Stmt objects
...
that will (soon) allow iteration over the initializers in
declarations. This new iterator mechanism is implemented by the
classes StmtIterator and ConstStmtIterator.
Patched a few files to use "operator++" instead of "operator+" on
child_iterators.
Friendship added in VarDecl to StmtIterator to allow returning a
reference to the initializer within the VarDecl. We may not wish this
as a permanent solution.
llvm-svn: 43105
2007-10-18 00:24:38 +00:00
Chris Lattner
9c0f9fe151
Make control flow in Expr::isConstantExpr more simple and
...
local, making the code easier to read.
llvm-svn: 43104
2007-10-18 00:20:32 +00:00
Evan Cheng
cdcc1d0444
Reverting r43070 for now. It's causing llc test failures.
...
llvm-svn: 43103
2007-10-17 23:51:13 +00:00
Bill Wendling
37f888e6e8
Test to make sure we don't generate unwind info for non-64-bit Objective-C.
...
llvm-svn: 43102
2007-10-17 23:14:56 +00:00
Chris Lattner
c6d91c0f6d
Add new API to rewrite one stmt/expr with another.
...
llvm-svn: 43101
2007-10-17 22:35:30 +00:00
Ted Kremenek
603fbbfcb7
ImutAVLTree now allocates tree nodes from the BumpPtrAllocator using
...
the new type-aligned Allocate() method.
llvm-svn: 43100
2007-10-17 22:17:01 +00:00
Ted Kremenek
3830606dee
Removed inclusion of cassert, which is no longer needed.
...
llvm-svn: 43099
2007-10-17 22:12:14 +00:00
Ted Kremenek
27d207d2e7
Minor cosmetic cleanups in the calculation of alignments for
...
StringMapEntry objects. No functionality change.
llvm-svn: 43097
2007-10-17 22:09:45 +00:00
Ted Kremenek
02c3267039
Added template function alignof() which provides a clean
...
function-based interface to getting the alignment of a type.
llvm-svn: 43096
2007-10-17 22:08:55 +00:00
Gordon Henriksen
0ab3d27641
Reverting unnecessary commit of generated files.
...
llvm-svn: 43095
2007-10-17 21:36:08 +00:00
Gordon Henriksen
ef5d08f4ea
Switching TargetMachineRegistry to use the new generic Registry.
...
llvm-svn: 43094
2007-10-17 21:28:48 +00:00
Chris Lattner
9515625d0c
Add rewriter support for @encode expressions. For example,
...
we currently turn:
c = @encode(char *)[2] + 4;
into:
c = "foo"[2] + 4;
Right now the foo string is hard coded, but you can imagine a world
where it wouldn't be :)
llvm-svn: 43093
2007-10-17 21:28:00 +00:00
Chris Lattner
42ebe5c1e6
The size returned by Rewriter::getRangeSize should include
...
the size of the last token.
llvm-svn: 43092
2007-10-17 21:23:07 +00:00
Chris Lattner
fd64ebd3e4
Fix assertion for raw lexer.
...
llvm-svn: 43091
2007-10-17 21:22:38 +00:00
Chris Lattner
8e129c23c8
Move token length calculation out of the diagnostics machinery into
...
the lexer, where it can be shared.
llvm-svn: 43090
2007-10-17 21:18:47 +00:00
Ted Kremenek
dbc8e043c2
Updated StringMap to use llvm::AlignOf to compute the alignment of map
...
entries.
llvm-svn: 43089
2007-10-17 21:13:50 +00:00
Gordon Henriksen
9c750f6fd1
Ignoring test/Transforms/LoopIndexSplit/Output.
...
llvm-svn: 43088
2007-10-17 21:11:33 +00:00
Ted Kremenek
a26294201f
Added member template functions to MallocAllocator and
...
BumpPtrAllocator that implement allocations that return a properly
typed pointer. For BumpPtrAllocator, the allocated memory is
automatically aligned to the minimum alignment of the type (as
calculated by llvm::AlignOf::Alignment).
llvm-svn: 43087
2007-10-17 21:10:21 +00:00
Ted Kremenek
391b728a99
Added llvm::AlignOf, a template class whose purpose is to portably
...
compute the minimum memory alignment of arbitrary types.
llvm-svn: 43086
2007-10-17 20:56:47 +00:00
Chris Lattner
4050f071e1
wean the diagnostics machinery off the preprocessor.
...
llvm-svn: 43085
2007-10-17 20:53:57 +00:00
Chris Lattner
02b436a05a
Add a new type of lexer: a raw lexer, which does not require a preprocessor
...
object in order to do its thing.
llvm-svn: 43084
2007-10-17 20:41:00 +00:00
Devang Patel
b3dac3f5d9
Do not raise free() call that is called through invoke instruction.
...
llvm-svn: 43083
2007-10-17 20:12:58 +00:00
Steve Naroff
a3f1336e39
rename test file for builtin "id"...
...
llvm-svn: 43082
2007-10-17 18:39:04 +00:00
Hartmut Kaiser
2f842e613f
Fixed linker errors (unresolved externals: split<>(...)) when compiling with VC++. Please review.
...
llvm-svn: 43081
2007-10-17 18:37:09 +00:00
Ted Kremenek
5c84c01c8b
Fixed includes of "clang/AST/DeclObjC.h" to work on case-sensitive
...
filesystems (was "#include "clang/AST/DeclObjc.h", which worked fine
on a case-insensitive HFS+ volume on the Mac).
llvm-svn: 43080
2007-10-17 18:36:42 +00:00
Chris Lattner
caecf03215
add some comments.
...
llvm-svn: 43079
2007-10-17 18:28:59 +00:00
Dan Gohman
d0806a0508
Don't mention -enable-unsafe-fp-math in LangRef.html, as that option is
...
assumed to globally mutate the spec.
llvm-svn: 43078
2007-10-17 18:05:13 +00:00
Steve Naroff
0f7a2d2dd1
Predefine all the ObjC goodies from <objc/objc.h>. Removed all the ObjC goodies from the respective test files. Moving forward, it will be very nice to assume these builtin!
...
llvm-svn: 43077
2007-10-17 17:53:50 +00:00
Dan Gohman
07159205dd
Define a helper function ConstantVector::getSplatValue for testing for
...
and working with broadcasted constants.
llvm-svn: 43076
2007-10-17 17:51:30 +00:00
Fariborz Jahanian
a32aaefadc
Implementation of AST for @protocol expression.
...
llvm-svn: 43075
2007-10-17 16:58:11 +00:00
Hartmut Kaiser
7078da8e58
Updated VC++ build system.
...
Silenced some VC++ warnings.
Had to rephrase a partial specialization of the IntrospectionTrait struct in SerializationTest.cpp, please review.
Added a compiler specific workaround in IdentifierTable.h. Is that the way to fix this kind of issues?
llvm-svn: 43074
2007-10-17 15:00:17 +00:00
Hartmut Kaiser
ec8a8d1f51
Updated VC++ build system.
...
Silenced some VC warnings.
I'm getting linker errors, though: unresolved externals:
llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
and
llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
Where are these defined?
llvm-svn: 43073
2007-10-17 14:56:40 +00:00
Dan Gohman
8f518b9875
Add support for ISD::SELECT in SplitVectorOp.
...
llvm-svn: 43072
2007-10-17 14:48:28 +00:00
Duncan Sands
d42c812f4a
Return Expand from getOperationAction for all extended
...
types. This is needed for SIGN_EXTEND_INREG at least.
It is not clear if this is correct for other operations.
On the other hand, for the various load/store actions
it seems to correct to return the type action, as is
currently done.
Also, it seems that SelectionDAG::getValueType can be
called for extended value types; introduce a map for
holding these, since we don't really want to extend
the vector to be 2^32 pointers long!
Generalize DAGTypeLegalizer::PromoteResult_TRUNCATE
and DAGTypeLegalizer::PromoteResult_INT_EXTEND to handle
the various funky possibilities that apints introduce,
for example that you can promote to a type that needs
to be expanded.
llvm-svn: 43071
2007-10-17 13:49:58 +00:00
Devang Patel
91ff13edcc
Apply "Instead of loading small c string constant, use integer constant directly" transformation while processing load instruction.
...
llvm-svn: 43070
2007-10-17 07:24:40 +00:00
Evan Cheng
0dde6e5761
Apply Chris' suggestions.
...
llvm-svn: 43069
2007-10-17 06:53:44 +00:00
Chris Lattner
12d5da49d3
Change fp to sint legalization on x86-32 to do 2 x i32
...
loads instead of 1 x i64 loads. This doesn't change any functionality yet.
llvm-svn: 43068
2007-10-17 06:17:29 +00:00
Chris Lattner
253023b25f
fix problems with test/sema/Cocoa.m etc on non-apple machines.
...
llvm-svn: 43067
2007-10-17 06:04:46 +00:00
Chris Lattner
693cbeadff
fix some funny indentation, add comments.
...
llvm-svn: 43066
2007-10-17 06:02:13 +00:00
Evan Cheng
c8b5397000
One more extract_subreg coalescing bug fix.
...
llvm-svn: 43065
2007-10-17 05:29:37 +00:00
Evan Cheng
5cfc2c640f
Update comments.
...
llvm-svn: 43064
2007-10-17 02:16:40 +00:00
Evan Cheng
7587d1bd19
Yet another test case for extract_subreg coalescing crash.
...
llvm-svn: 43063
2007-10-17 02:15:06 +00:00
Evan Cheng
9b0a44a2ce
Fix MergeValueInAsValue(). It allows overlapping live ranges but should replace
...
their value numbers with the specified value number.
llvm-svn: 43062
2007-10-17 02:13:29 +00:00
Evan Cheng
a6fd8bc97e
Clean up code that calculate MBB live-in's.
...
llvm-svn: 43061
2007-10-17 02:12:22 +00:00
Evan Cheng
8b8c7c9927
Clean up code that calculate MBB live-in's.
...
llvm-svn: 43060
2007-10-17 02:10:22 +00:00
Owen Anderson
84490d44ec
Move splitBlock into DomTreeBase from DomTree.
...
llvm-svn: 43059
2007-10-17 02:03:17 +00:00
Anders Carlsson
f94cd1ffe6
Generate code for static variables that don't have initializers. Also, report an error if a static initializer is not constant.
...
llvm-svn: 43058
2007-10-17 00:52:43 +00:00
Anders Carlsson
86edafc6d6
Fix the build.
...
llvm-svn: 43057
2007-10-17 00:50:25 +00:00
Devang Patel
8d818f5e80
Use immediate stores.
...
llvm-svn: 43055
2007-10-16 23:44:18 +00:00
Ted Kremenek
970217fae9
Added Driver/SerializationTest.cpp to the XCode project.
...
llvm-svn: 43054
2007-10-16 23:40:12 +00:00
Dale Johannesen
e5facd51cb
Disable attempts to constant fold PPC f128.
...
Remove the assumption that this will happen from
various places.
llvm-svn: 43053
2007-10-16 23:38:29 +00:00
Ted Kremenek
4e816133c8
Started work on clang object serialization. Experimental
...
serialization logic as well as driver code is now in
Driver/SerializationTest.cpp. The status of this code is that it
should be used by no clients.
Added --test-pickling option to driver to run the serialization code.
Modified IdentifierInfo and IdentifierTable to have friend classes
that permit object serialization. Such friendship may not be needed
in the final design.
llvm-svn: 43052
2007-10-16 23:37:27 +00:00
Fariborz Jahanian
6bd1d612ac
Fix location processing of @selector: the range should include the @ sign.
...
llvm-svn: 43051
2007-10-16 23:21:02 +00:00
Steve Naroff
077c83bddb
Add Sema::CheckMessageArgumentTypes()...
...
llvm-svn: 43050
2007-10-16 23:12:48 +00:00
Owen Anderson
7bcc28bf6c
Fix some formatting.
...
llvm-svn: 43049
2007-10-16 22:59:15 +00:00
Chris Lattner
37390bed4d
Fix location processing of @encode: the range should include the @ sign.
...
@selector probably gets this wrong also.
llvm-svn: 43048
2007-10-16 22:51:17 +00:00
Chris Lattner
a7c19feca2
Add a new Rewriter::getRangeSize method.
...
Rename SourceRange::Begin()/End() to getBegin()/getEnd() for
consistency with other code.
Start building the rewriter towards handling @encode.
llvm-svn: 43047
2007-10-16 22:36:42 +00:00
Fariborz Jahanian
ebac2cb235
Patch to diagnose duplicate method implementations.
...
llvm-svn: 43046
2007-10-16 21:52:23 +00:00
Steve Naroff
d275426449
Remove ObjcMethodDecl::getNumMethodParams/getMethodParamDecl, they aren't used/needed.
...
Change ObjcMethodDecl::getMethodType to getResultType, to match FunctionDecl.
llvm-svn: 43045
2007-10-16 21:36:54 +00:00
Chris Lattner
5a2fe28aca
publish location info
...
llvm-svn: 43044
2007-10-16 21:21:26 +00:00
Evan Cheng
8f644cef0f
Some clean up.
...
llvm-svn: 43043
2007-10-16 21:09:14 +00:00
Fariborz Jahanian
923aebe09c
Steve, pointer out that getName() is available for selectors. Made code much smaller, thanks.
...
llvm-svn: 43042
2007-10-16 21:07:53 +00:00
Chris Lattner
0bd1c97293
Push the rewriter forward a bit more. Now it rewrites
...
#import to #include's as a test.
llvm-svn: 43041
2007-10-16 21:07:07 +00:00
Chris Lattner
9a36bb84ea
these aren't const.
...
llvm-svn: 43040
2007-10-16 21:04:49 +00:00
Fariborz Jahanian
81ccd88f0e
Fix problem dumping/printing method names with null selector.
...
llvm-svn: 43039
2007-10-16 20:52:13 +00:00
Fariborz Jahanian
4bef462a3e
Patch to implement AST generation for objective-c's @selector expression.
...
llvm-svn: 43038
2007-10-16 20:40:23 +00:00
Steve Naroff
55f52da24c
Emit diagnostics for methods not found.
...
llvm-svn: 43037
2007-10-16 20:39:36 +00:00
Owen Anderson
4187801f85
Template DominatorTreeBase by node type. This is the next major step towards
...
having dominator information on MBB's.
llvm-svn: 43036
2007-10-16 19:59:25 +00:00
Evan Cheng
fab7ca89d5
Fix PR1734.
...
llvm-svn: 43035
2007-10-16 19:29:47 +00:00
Dale Johannesen
e43b960d3b
New test for svn rev 43033, radar 5538745.
...
llvm-svn: 43034
2007-10-16 18:10:14 +00:00
Dale Johannesen
e5530a35d4
Check for invalid cc's in f80 select.
...
llvm-svn: 43033
2007-10-16 18:09:08 +00:00
Chris Lattner
1366653e2f
Fix a bug handling frame references in ppc inline asm when the frame offset
...
doesn't fit into 16 bits.
llvm-svn: 43032
2007-10-16 18:00:18 +00:00
Duncan Sands
ce042d0bc0
Document the fact that the verifier currently requires the
...
top bit of a ValueType to be zero. Enforce this by ensuring
an assertion failure if someone tries to create a ValueType
without this property. I chose this minimal approach rather
than a more official integration of the notion of reserved
bits into ValueType because I'm hoping that the verifier will
be changed to no longer require this :)
llvm-svn: 43031
2007-10-16 13:34:11 +00:00
Duncan Sands
bbbfbe95f7
Initial infrastructure for arbitrary precision integer
...
codegen support. This should have no effect on codegen
for other types. Debatable bits: (1) the use (abuse?)
of a set in SDNode::getValueTypeList; (2) the length of
getTypeToTransformTo, which maybe should be refactored
with a non-inline part for extended value types.
llvm-svn: 43030
2007-10-16 09:56:48 +00:00
Anton Korobeynikov
002c52ce6e
Unbreak mingw32. Maybe there should be something like libClandSystem? :)
...
llvm-svn: 43029
2007-10-16 09:09:44 +00:00
Duncan Sands
052c843559
Fixes due to lack of type-safety for ValueType: (1) ValueType
...
being passed instead of an opcode; (2) ValueType being passed
for isVolatile (!) in getLoad.
llvm-svn: 43028
2007-10-16 09:07:20 +00:00
Arnold Schwaighofer
b3d58b98d0
Correction to tail call optimization code. The new return address
...
was stored to the acutal stack slot before the parameters were
lowered to their stack slot. This could cause arguments to be
overwritten by the return address if the called function had less
parameters than the caller function. The update should remove the
last failing test case of llc-beta: SPASS.
llvm-svn: 43027
2007-10-16 09:05:00 +00:00
Evan Cheng
ecf62cb763
Code clean up.
...
llvm-svn: 43026
2007-10-16 08:04:24 +00:00
Chris Lattner
cece03dd89
implement promotion of select and select_cc, allowing MallocBench/gs to
...
work with type promotion on x86.
llvm-svn: 43025
2007-10-16 03:00:22 +00:00
Chris Lattner
e6dcd505d0
initialization of references should not do default fn/array promotions.
...
This fixes a bug Anders noticed.
llvm-svn: 43024
2007-10-16 02:55:40 +00:00
Steve Naroff
698495522d
Bad cast...need to use dyn_cast_or_null. Also changed Sema::InitBuiltinVaListType (which had the same bug).
...
llvm-svn: 43023
2007-10-16 00:00:18 +00:00
Fariborz Jahanian
76a9427783
Patch to parse @selector expressions.
...
llvm-svn: 43022
2007-10-15 23:39:13 +00:00
Steve Naroff
f73b784a5e
Change the type of ObjCStringLiteral from "struct __builtin_CFString *" to "NSConstantString *".
...
This makes the typecheck much happier. Without this change, the type checker would have to special case "struct __builtin_CFString *". This change does assume the interface for NSConstantString is declared in the translation unit.
I left ASTContext::getCFConstantStringType() around for now (with a comment that says it is currently unused).
llvm-svn: 43021
2007-10-15 23:35:17 +00:00
Dan Gohman
9aa4fc5cd6
Teach IntrinsicLowering.cpp about the sin, cos, and pow intrinsics.
...
llvm-svn: 43020
2007-10-15 22:07:31 +00:00
Evan Cheng
04c44712d3
Make CalcLatency() non-recursive.
...
llvm-svn: 43017
2007-10-15 21:33:22 +00:00
Dan Gohman
a8656d4798
Fix a typo in a comment.
...
llvm-svn: 43016
2007-10-15 21:10:03 +00:00
Dan Gohman
d4f2165007
Document the -view-sunit-dags option.
...
llvm-svn: 43015
2007-10-15 21:07:59 +00:00
Steve Naroff
126b4d835f
Fix a parser bug with message expressions - need to call ParsePostfixExpressionSuffix().
...
Now were correctly allow the following...
i = [str rangeOfString:@"]"].length;
llvm-svn: 43012
2007-10-15 20:55:58 +00:00
Steve Naroff
32e44c0032
Move type compatibility predicates from Type to ASTContext. In addition, the predicates are now instance methods (they were previously static class methods on Type).
...
This allowed me to fix the following hack from this weekend...
// FIXME: Devise a way to do this without using strcmp.
// Would like to say..."return getAsStructureType() == IdStructType;", but
// we don't have a pointer to ASTContext.
bool Type::isObjcIdType() const {
if (const RecordType *RT = getAsStructureType())
return !strcmp(RT->getDecl()->getName(), "objc_object");
return false;
}
...which is now...
bool isObjcIdType(QualType T) const {
return T->getAsStructureType() == IdStructType;
}
Side notes:
- I had to remove a convenience function from the TypesCompatibleExpr class.
int typesAreCompatible() const {return Type::typesAreCompatible(Type1,Type2);}
Which required a couple clients get a little more verbose...
- Result = TCE->typesAreCompatible();
+ Result = Ctx.typesAreCompatible(TCE->getArgType1(), TCE->getArgType2());
Overall, I think this change also makes sense for a couple reasons...
1) Since ASTContext vends types, it makes sense for the type compatibility API to be there.
2) This allows the type compatibility predeciates to refer to data not strictly present in the AST (which I have found problematic on several occasions).
llvm-svn: 43009
2007-10-15 20:41:53 +00:00
Dan Gohman
b6324c1243
Document the new llvm.sin, llvm.cos, and llvm.pow intrinsics. Feedback
...
is welcome!
llvm-svn: 43007
2007-10-15 20:30:11 +00:00
Anders Carlsson
7e13ab88a2
Add code generation and sema checking for __builtin_va_arg.
...
llvm-svn: 43006
2007-10-15 20:28:48 +00:00
Chris Lattner
06a4954e6e
Change LowerFP_TO_SINT to create the specific code it needs instead of
...
unconditionally creating an i64 bitcast. With the future legalizer
design, operation legalization can't introduce new nodes with illegal
types.
This fixes the rest of olden on ppc32.
llvm-svn: 43005
2007-10-15 20:14:52 +00:00
Evan Cheng
7bcfd8f880
LowerFP_TO_SINT must not create a stack object if it's not needed.
...
llvm-svn: 43004
2007-10-15 20:11:21 +00:00
Devang Patel
324fe8904f
Add removeModuleProvider()
...
llvm-svn: 43002
2007-10-15 19:56:32 +00:00
Dan Gohman
e862243e1c
Reapply the fix in 42908 for this file. This changes the function names
...
from "test" to "foo" so that they don't match the grep -i ST.
llvm-svn: 43001
2007-10-15 19:22:17 +00:00
Fariborz Jahanian
d4b3015dd7
Several name lookup conflict detection fixes involving objective-c names.
...
llvm-svn: 43000
2007-10-15 19:16:57 +00:00
Ted Kremenek
7bbc582bb3
Fixed incorrect renaming of method name (forgot two characters).
...
llvm-svn: 42999
2007-10-15 19:15:48 +00:00
Ted Kremenek
fcce4f378f
Added more doxygen comments.
...
Renamed internal method of ImutAVLTree::RemoveMutableFlag to MarkImmutable.
Added enum for bit manipulation (more self-documentating).
llvm-svn: 42998
2007-10-15 18:52:34 +00:00
Evan Cheng
a5abba65b6
Fix PR1729: watch out for val# with no def.
...
llvm-svn: 42996
2007-10-15 18:33:50 +00:00
Chris Lattner
d6f7d44eae
Move CreateStackTemporary out to SelectionDAG
...
llvm-svn: 42995
2007-10-15 17:48:57 +00:00
Chris Lattner
9eb7a829e6
add a new CreateStackTemporary helper method.
...
llvm-svn: 42994
2007-10-15 17:47:20 +00:00
Chris Lattner
9d5b131e70
implement promotion of BR_CC operands, fixing bisort on ppc.
...
llvm-svn: 42992
2007-10-15 17:16:12 +00:00
Chris Lattner
8555e69def
updates from duncan
...
llvm-svn: 42991
2007-10-15 16:46:29 +00:00
Tanya Lattner
9486b19066
Fix run line.
...
llvm-svn: 42990
2007-10-15 16:35:13 +00:00
Devang Patel
80b1222274
New test.
...
llvm-svn: 42986
2007-10-15 15:41:07 +00:00
Devang Patel
bff4aea328
Achieve same result but use fewer lines of code.
...
llvm-svn: 42985
2007-10-15 15:31:35 +00:00
Neil Booth
9130551996
Fast-track obviously over-large and over-small exponents during decimal->
...
integer conversion. In some such cases this makes us one or two orders
of magnitude faster than NetBSD's libc. Glibc seems to have a similar
fast path.
Also, tighten up some upper bounds to save a bit of memory.
llvm-svn: 42984
2007-10-15 15:00:55 +00:00
Steve Naroff
66e9f331ba
Added ASTContext::setObjcIdType/getObjcIdType(), set by Sema.
...
Also noticed ASTContext::BuiltinVaListType wasn't being initialized to the null type (so I set it).
llvm-svn: 42983
2007-10-15 14:41:52 +00:00
Duncan Sands
f6977d9842
Fix some typos. Call getTypeToTransformTo rather than
...
getTypeToExpandTo. The difference is that
getTypeToExpandTo gives the final result of expansion
(eg: i128 -> i32 on a 32 bit machine) while
getTypeToTransformTo does just one step (i128 -> i64).
llvm-svn: 42982
2007-10-15 13:30:18 +00:00
Chris Lattner
3cfb56d489
One mundane change: Change ReplaceAllUsesOfValueWith to *optionally*
...
take a deleted nodes vector, instead of requiring it.
One more significant change: Implement the start of a legalizer that
just works on types. This legalizer is designed to run before the
operation legalizer and ensure just that the input dag is transformed
into an output dag whose operand and result types are all legal, even
if the operations on those types are not.
This design/impl has the following advantages:
1. When finished, this will *significantly* reduce the amount of code in
LegalizeDAG.cpp. It will remove all the code related to promotion and
expansion as well as splitting and scalarizing vectors.
2. The new code is very simple, idiomatic, and modular: unlike
LegalizeDAG.cpp, it has no 3000 line long functions. :)
3. The implementation is completely iterative instead of recursive, good
for hacking on large dags without blowing out your stack.
4. The implementation updates nodes in place when possible instead of
deallocating and reallocating the entire graph that points to some
mutated node.
5. The code nicely separates out handling of operations with invalid
results from operations with invalid operands, making some cases
simpler and easier to understand.
6. The new -debug-only=legalize-types option is very very handy :),
allowing you to easily understand what legalize types is doing.
This is not yet done. Until the ifdef added to SelectionDAGISel.cpp is
enabled, this does nothing. However, this code is sufficient to legalize
all of the code in 186.crafty, olden and freebench on an x86 machine. The
biggest issues are:
1. Vectors aren't implemented at all yet
2. SoftFP is a mess, I need to talk to Evan about it.
3. No lowering to libcalls is implemented yet.
4. Various operations are missing etc.
5. There are FIXME's for stuff I hax0r'd out, like softfp.
Hey, at least it is a step in the right direction :). If you'd like to help,
just enable the #ifdef in SelectionDAGISel.cpp and compile code with it. If
this explodes it will tell you what needs to be implemented. Help is
certainly appreciated.
Once this goes in, we can do three things:
1. Add a new pass of dag combine between the "type legalizer" and "operation
legalizer" passes. This will let us catch some long-standing isel issues
that we miss because operation legalization often obfuscates the dag with
target-specific nodes.
2. We can rip out all of the type legalization code from LegalizeDAG.cpp,
making it much smaller and simpler. When that happens we can then
reimplement the core functionality left in it in a much more efficient and
non-recursive way.
3. Once the whole legalizer is non-recursive, we can implement whole-function
selectiondags maybe...
llvm-svn: 42981
2007-10-15 06:10:22 +00:00
Chris Lattner
b193517eed
One xform performed by LegalizeDAG is transformation of "store of fp" to "store of int".
...
Make two changes:
1) only xform "store of f32" if i32 is a legal type for the target.
2) only xform "store of f64" if either i64 or i32 are legal for the target.
3) if i64 isn't legal, manually lower to 2 stores of i32 instead of letting a
later pass of legalize do it. This is ugly, but helps future changes I'm
about to commit.
llvm-svn: 42980
2007-10-15 05:46:06 +00:00
Chris Lattner
2b827fd70d
avoid an APFloat copy.
...
llvm-svn: 42979
2007-10-15 05:34:10 +00:00
Chris Lattner
90e0b271df
Add a (disabled by default) way to view the ID of a node.
...
llvm-svn: 42978
2007-10-15 05:32:43 +00:00
Chris Lattner
bfdebe33a0
remove dead enum, make setNodeId public.
...
llvm-svn: 42977
2007-10-15 05:30:55 +00:00
Chris Lattner
a2ebb9aadd
Fix 80 col violation
...
llvm-svn: 42976
2007-10-15 05:30:27 +00:00
Steve Naroff
271643620b
Teach the type checker about "id". This removes the following bogus warning...
...
[dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang t.m
t.m:29:18: warning: incompatible pointer types assigning 'id' to 'NSString *'
resultString = [[NSString alloc] initWithFormat:0 arguments:0];
~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
llvm-svn: 42975
2007-10-15 03:14:16 +00:00
Anders Carlsson
cbfc4b8824
Add support for Pascal strings.
...
llvm-svn: 42974
2007-10-15 02:50:23 +00:00
Anders Carlsson
b30f47a869
Fix a warning
...
llvm-svn: 42973
2007-10-15 02:50:04 +00:00
Dale Johannesen
207bd4d90e
Handle PPC long double in CBackend.
...
llvm-svn: 42972
2007-10-15 01:05:37 +00:00
Steve Naroff
5d15254496
- Teach ObjcInterfaceDecl::lookupInstance/ClassMethod to look through protocols.
...
- Start looking up methods in the global method pools (for "id").
- Start integrating interface types into the type system.
llvm-svn: 42971
2007-10-14 23:13:51 +00:00
Chris Lattner
fbbe570994
remove misleading comment.
...
llvm-svn: 42970
2007-10-14 20:35:12 +00:00
Chris Lattner
ebe491ea9c
If a target doesn't have HasMULHU or HasUMUL_LOHI, ExpandOp would return
...
without lo/hi set. Fall through to making a libcall instead.
llvm-svn: 42969
2007-10-14 18:35:05 +00:00
Steve Naroff
ca0ecfe048
Add category lookup (removing a couple FIXME's).
...
Changed ObjcInterfaceDecl::ListCategories->CategoryList.
llvm-svn: 42968
2007-10-14 18:27:41 +00:00
Steve Naroff
e7ed06e6fc
Fix -ast-dump for ObjC.
...
llvm-svn: 42967
2007-10-14 17:03:01 +00:00
Neil Booth
5fe658b21d
Consolidate logic for creating NaNs. Silence compiler warning.
...
llvm-svn: 42966
2007-10-14 10:39:51 +00:00
Neil Booth
06077e7c3c
Whether arithmetic is supported is a property of the semantics. Make it
...
so, and clean up the checks by putting them in an inline function.
llvm-svn: 42965
2007-10-14 10:29:28 +00:00
Neil Booth
4ed401b898
Separate out parsing of decimal number. Use this to only allocate
...
memory for the significand once up-front. Also ignore insignificant
trailing zeroes; this saves unnecessary multiplications later.
llvm-svn: 42964
2007-10-14 10:16:12 +00:00
Evan Cheng
d8771e915c
New test case.
...
llvm-svn: 42963
2007-10-14 10:15:03 +00:00
Evan Cheng
4099f4f91a
Unbreak x86-64.
...
llvm-svn: 42962
2007-10-14 10:09:39 +00:00
Evan Cheng
8d6da9142c
When coalescing an EXTRACT_SUBREG and the dst register is a physical register,
...
the source register will be coalesced to the super register of the LHS. Properly
merge in the live ranges of the resulting coalesced interval that were part of
the original source interval to the live interval of the super-register.
llvm-svn: 42961
2007-10-14 10:08:34 +00:00
Evan Cheng
cdf3609130
Revert 42908 for now.
...
llvm-svn: 42960
2007-10-14 05:57:21 +00:00
Dale Johannesen
2f6b6d6fb0
Fix type mismatch error in PPC Altivec (only causes
...
a problem when asserts are on). From vecLib.
llvm-svn: 42959
2007-10-14 01:58:32 +00:00
Dale Johannesen
19db093b35
Disable some compile-time optimizations on PPC
...
long double.
llvm-svn: 42958
2007-10-14 01:56:47 +00:00
Steve Naroff
5811baf1a0
- Added Sema::AddFactoryMethodToGlobalPool and Sema::AddInstanceMethodToGlobalPool and DenseMaps. This will allow us to efficiently lookup a method from a selector given no type information (for the "id" data type).
...
- Fixed some funky "}
else {" indentation in Sema::ActOnAddMethodsToObjcDecl(). I'd prefer we stay away from this style...it wastes space and isn't any easier to read (from my perspective, at least:-)
- Changed Parser::ParseObjCInterfaceDeclList() to only call Action::ActOnAddMethodsToObjcDecl() when it actually has methods to add (since most interface have methods, this is a very minor cleanup).
llvm-svn: 42957
2007-10-14 00:58:41 +00:00
Gordon Henriksen
a699c4dc65
Fixing a typo. Found by Kevin André!
...
llvm-svn: 42956
2007-10-14 00:34:53 +00:00
Duncan Sands
29af26f147
Clarify that fastcc has a problem with nested function
...
trampolines, rather than with nested functions themselves.
llvm-svn: 42955
2007-10-13 07:38:37 +00:00
Chris Lattner
f47e30627a
Enhance the truncstore optimization code to handle shifted
...
values and propagate demanded bits through them in simple cases.
This allows this code:
void foo(char *P) {
strcpy(P, "abc");
}
to compile to:
_foo:
ldrb r3, [r1]
ldrb r2, [r1, #+1]
ldrb r12, [r1, #+2]!
ldrb r1, [r1, #+1]
strb r1, [r0, #+3]
strb r2, [r0, #+1]
strb r12, [r0, #+2]
strb r3, [r0]
bx lr
instead of:
_foo:
ldrb r3, [r1, #+3]
ldrb r2, [r1, #+2]
orr r3, r2, r3, lsl #8
ldrb r2, [r1, #+1]
ldrb r1, [r1]
orr r2, r1, r2, lsl #8
orr r3, r2, r3, lsl #16
strb r3, [r0]
mov r2, r3, lsr #24
strb r2, [r0, #+3]
mov r2, r3, lsr #16
strb r2, [r0, #+2]
mov r3, r3, lsr #8
strb r3, [r0, #+1]
bx lr
testcase here: test/CodeGen/ARM/truncstore-dag-combine.ll
This also helps occasionally for X86 and other cases not involving
unaligned load/stores.
llvm-svn: 42954
2007-10-13 06:58:48 +00:00
Chris Lattner
2ce649ebea
new testcase
...
llvm-svn: 42953
2007-10-13 06:56:18 +00:00
Chris Lattner
5e6fe054a2
Add a simple optimization to simplify the input to
...
truncate and truncstore instructions, based on the
knowledge that they don't demand the top bits.
llvm-svn: 42952
2007-10-13 06:35:54 +00:00
Anders Carlsson
d5f857f2e5
Fix an incorrect assertion.
...
llvm-svn: 42951
2007-10-13 05:52:34 +00:00
Neil Booth
c799fe9ed9
If the power of 5 is exact, and the reciprocal exact, the error is zero not one half-ulps. This prevents an infinite loop in rare cases.
...
llvm-svn: 42950
2007-10-13 03:34:08 +00:00
Evan Cheng
f86204baf4
Fix test case.
...
llvm-svn: 42949
2007-10-13 03:14:06 +00:00
Evan Cheng
54bec86754
New tests.
...
llvm-svn: 42948
2007-10-13 03:10:54 +00:00
Evan Cheng
b63076504e
Local spiller optimization:
...
Turn this:
movswl %ax, %eax
movl %eax, -36(%ebp)
xorl %edi, -36(%ebp)
into
movswl %ax, %eax
xorl %edi, %eax
movl %eax, -36(%ebp)
by unfolding the load / store xorl into an xorl and a store when we know the
value in the spill slot is available in a register. This doesn't change the
number of instructions but reduce the number of times memory is accessed.
Also unfold some load folding instructions and reuse the value when similar
situation presents itself.
llvm-svn: 42947
2007-10-13 02:50:24 +00:00
Evan Cheng
7082dcf605
Change unfoldMemoryOperand(). User is now responsible for passing in the
...
register used by the unfolded instructions. User can also specify whether to
unfold the load, the store, or both.
llvm-svn: 42946
2007-10-13 02:35:06 +00:00
Evan Cheng
9490e0d078
Optionally create a MachineInstr without default implicit operands.
...
llvm-svn: 42945
2007-10-13 02:23:01 +00:00
Chris Lattner
6a91cc03ad
haha, my devious plot is complete:
...
$ clang rewrite.c -rewrite-test
prints:
int foo() {
b: foo();
f: foo();
foo();
}
for:
int foo() {
b: foo();
f: foo();
foo();
}
amazing.
llvm-svn: 42944
2007-10-13 00:46:29 +00:00
Anders Carlsson
a7408e742a
Add __builtin_va_list definitions for x86_64 and ppc64.
...
llvm-svn: 42943
2007-10-13 00:45:48 +00:00
Chris Lattner
2a8ab05f5f
With this I can now insert stuff before tabs, woo.
...
llvm-svn: 42942
2007-10-13 00:21:23 +00:00
Chris Lattner
58bad341bc
Woo, tab deletion now works. Next lets see if we can
...
insert stuff.
llvm-svn: 42941
2007-10-13 00:17:04 +00:00
Chris Lattner
2fcf1b83c1
another step forward in rewriter stuff. This still has
...
some incredibly subtle details that I'm working on getting
right.
llvm-svn: 42940
2007-10-13 00:11:23 +00:00
Anders Carlsson
24ebce6fca
Generate code for va_start and va_end.
...
llvm-svn: 42939
2007-10-12 23:56:29 +00:00
Fariborz Jahanian
fd0312ed79
Patch to check for duplicate method decls in protocols.
...
llvm-svn: 42938
2007-10-12 23:43:31 +00:00
Chris Lattner
bee82b0675
remove dead method with bogus comment.
...
llvm-svn: 42937
2007-10-12 23:18:19 +00:00
Fariborz Jahanian
ecfe4f1453
Check and diagnose that objective-c objects may not be statically allocated.
...
llvm-svn: 42936
2007-10-12 22:10:42 +00:00
Arnold Schwaighofer
e8d0bf2669
Correcting the corrections. Bad bad baaad emacs!
...
llvm-svn: 42935
2007-10-12 21:53:12 +00:00
Arnold Schwaighofer
1f0da1fefb
Corrected many typing errors. And removed 'nest' parameter handling
...
for fastcc from X86CallingConv.td. This means that nested functions
are not supported for calling convention 'fastcc'.
llvm-svn: 42934
2007-10-12 21:30:57 +00:00
Ted Kremenek
41362cea7b
Added notion of '*' specified format width/specifiers when checking
...
printf format strings. Added type checking to see if the matching
width/precision argument was of type 'int'.
Thanks to Anders Carlsson for reporting this missing feature.
llvm-svn: 42933
2007-10-12 20:51:52 +00:00
Dan Gohman
e0ad9ea7cd
Fix this test to not depend on the assembly output containing something
...
that includes the string "st". This probably fixes the regression on
Darwin.
llvm-svn: 42932
2007-10-12 20:42:14 +00:00
Chris Lattner
2c06f7ea45
add a new SM::getDecomposedFileLoc method.
...
llvm-svn: 42931
2007-10-12 20:24:19 +00:00
Devang Patel
371e6ca690
Dest type is always i8 *. This allows some simplification.
...
Do not filter memmove.
llvm-svn: 42930
2007-10-12 20:10:21 +00:00
Devang Patel
da53e9c9c1
t
...
llvm-svn: 42929
2007-10-12 20:04:24 +00:00
Fariborz Jahanian
02fbb68e85
Fixed typo in comment.
...
llvm-svn: 42928
2007-10-12 19:53:08 +00:00
Gordon Henriksen
3fb03e4080
Fix ocaml bindings for picky linkers. :)
...
Thanks to Török Edvin for helping to track this down.
llvm-svn: 42927
2007-10-12 19:48:13 +00:00
Fariborz Jahanian
c7afeebb12
Fixed a @compatible_alias bug. In the process, discovered unnecessary 2ndry lookup
...
ok class names and streamlined this logic to do the lookup once.
llvm-svn: 42926
2007-10-12 19:38:20 +00:00
Duncan Sands
a6286bd502
Due to the new tail call optimization, trampolines can no
...
longer be created for fastcc functions.
llvm-svn: 42925
2007-10-12 19:37:31 +00:00
Dale Johannesen
61c574fc51
ppc long double. Implement fabs and fneg.
...
llvm-svn: 42924
2007-10-12 19:02:17 +00:00
Steve Naroff
b915146a5d
Replace one FIXME with another. We handle protocols just fine now. The ObjC decl will only be 0 when we have an error on the ObjC decl. I would prefer we pass in a decl that is marked as invalid. I don't think this is critical to fix now, however I'd like us to be consistent. There are currently many places that don't mark the decl as invalid (which need to be fixed)...
...
llvm-svn: 42923
2007-10-12 18:49:25 +00:00
Evan Cheng
409fa443fc
Update.
...
llvm-svn: 42922
2007-10-12 18:22:55 +00:00
Chris Lattner
e6f1c3813d
don't use intptr_t without including it.
...
llvm-svn: 42921
2007-10-12 18:16:23 +00:00
Chris Lattner
ad618f66e6
Fix a bug in my patch last night that broke InstCombine/2007-10-12-Crash.ll
...
llvm-svn: 42920
2007-10-12 18:05:47 +00:00
Dale Johannesen
a1a4a9ebfa
Implement i64->ppcf128 conversions.
...
llvm-svn: 42919
2007-10-12 17:52:03 +00:00
Chris Lattner
4c461477bd
Make this compute the correct offset, handling alignment of the element
...
pointer correctly.
llvm-svn: 42918
2007-10-12 17:49:52 +00:00
Anders Carlsson
431ef632cb
Add some more diagnostics for va_start, fix tests so they pass with these new diags.
...
llvm-svn: 42917
2007-10-12 17:48:41 +00:00
Evan Cheng
1410b8512c
Did mean to leave this in. INSERT_SUBREG isn't being coalesced yet.
...
llvm-svn: 42916
2007-10-12 17:16:50 +00:00
Fariborz Jahanian
d52cd41630
Fixed a bug whereby, struct tag name matches a typedef/objc-class name
...
and hid them.
llvm-svn: 42915
2007-10-12 16:34:10 +00:00
Steve Naroff
b213da2a70
Temporary fix to test case. This area is currently under construction...test case will be changing again soon.
...
llvm-svn: 42914
2007-10-12 16:15:17 +00:00
Neil Booth
d502a82092
Remove duplicate comment.
...
llvm-svn: 42913
2007-10-12 16:05:57 +00:00
Neil Booth
b93d90e98c
Implement correctly-rounded decimal->binary conversion, i.e. conversion
...
from user input strings.
Such conversions are more intricate and subtle than they may appear;
it is unlikely I have got it completely right first time. I would
appreciate being informed of any bugs and incorrect roundings you
might discover.
llvm-svn: 42912
2007-10-12 16:02:31 +00:00
Neil Booth
e9dbe094aa
Remove a field that was never used.
...
llvm-svn: 42911
2007-10-12 15:35:10 +00:00
Neil Booth
146fdb3eeb
If we're trying to be arbitrary precision, unsigned char clearly won't cut it. Needed for dec->bin conversions.
...
llvm-svn: 42910
2007-10-12 15:33:27 +00:00
Neil Booth
7e74b17ad2
Don't attempt to mask no bits
...
llvm-svn: 42909
2007-10-12 15:31:31 +00:00
Dan Gohman
dc35bd79ca
Change the names used for internal labels to use the current
...
function symbol name instead of a codegen-assigned function
number.
Thanks Evan! :-)
llvm-svn: 42908
2007-10-12 14:53:36 +00:00
Dan Gohman
e3583817ac
Fix some corner cases with vectors in copyToRegs and copyFromRegs.
...
llvm-svn: 42907
2007-10-12 14:33:11 +00:00
Dan Gohman
4f056f3c10
Add support to SplitVectorOp for powi, where the second operand
...
is a scalar integer.
llvm-svn: 42906
2007-10-12 14:13:46 +00:00
Dan Gohman
8d978da3b0
Mark vector ctpop, cttz, and ctlz as Expand on x86.
...
llvm-svn: 42905
2007-10-12 14:09:42 +00:00
Dan Gohman
9013eaff9a
Mark vector pow, ctpop, cttz, and ctlz as Expand on PowerPC.
...
llvm-svn: 42904
2007-10-12 14:08:57 +00:00
Evan Cheng
11330f7526
Restrict EXTRACT_SUBREG coalescing to avoid negative performance impact.
...
llvm-svn: 42903
2007-10-12 09:15:53 +00:00
Evan Cheng
f8e28b152a
Doh.
...
llvm-svn: 42901
2007-10-12 09:10:27 +00:00
Evan Cheng
b83a379f4f
EXTRACT_SUBREG test case.
...
llvm-svn: 42900
2007-10-12 09:03:31 +00:00
Evan Cheng
aa2d6ef81d
EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG like
...
(almost) a register copy. However, it always coalesced to the register of the
RHS (the super-register). All uses of the result of a EXTRACT_SUBREG are sub-
register uses which adds subtle complications to load folding, spiller rewrite,
etc.
llvm-svn: 42899
2007-10-12 08:50:34 +00:00
Evan Cheng
89d5916921
Some clean up.
...
llvm-svn: 42898
2007-10-12 08:45:27 +00:00
Evan Cheng
6fd54fd19c
Cosmetic.
...
llvm-svn: 42897
2007-10-12 08:40:44 +00:00
Evan Cheng
2e3d609da6
Fix typos.
...
llvm-svn: 42896
2007-10-12 08:39:02 +00:00
Evan Cheng
09c0fe0a7f
Fold load / store into MOV32to32_ and MOV16to16_.
...
llvm-svn: 42895
2007-10-12 08:38:01 +00:00
Evan Cheng
f8c23f074b
Flag MOV32to32_ with EXTRACT_SUBREG. They should not be scheduled apart.
...
llvm-svn: 42894
2007-10-12 07:55:53 +00:00
Arnold Schwaighofer
9653e677d5
Added missing -march=x86 flag.
...
llvm-svn: 42893
2007-10-12 07:49:48 +00:00
Gabor Greif
5d8f7e0cc7
eliminate warning
...
llvm-svn: 42892
2007-10-12 07:44:54 +00:00
Chris Lattner
d8675e4915
Fix some 80 column violations.
...
Fix DecomposeSimpleLinearExpr to handle simple constants better.
Don't nuke gep(bitcast(allocation)) if the bitcast(allocation) will
fold the allocation. This fixes PR1728 and Instcombine/malloc3.ll
llvm-svn: 42891
2007-10-12 05:30:59 +00:00
Chris Lattner
3e99eb25ee
testcase for PR1728
...
llvm-svn: 42890
2007-10-12 05:29:53 +00:00
Chris Lattner
7119397fa1
make operator== work with non-equal sized bitvectors, as long as
...
the extra bits are all zeros. This allows "010" and "010000" to be
treated as equal.
llvm-svn: 42889
2007-10-12 03:48:59 +00:00
Dale Johannesen
05ff9e8cda
PPC long double. Implement a couple more conversions.
...
llvm-svn: 42888
2007-10-12 01:37:08 +00:00
Chris Lattner
3ec1bad331
add comments.
...
llvm-svn: 42887
2007-10-12 00:37:26 +00:00
Ted Kremenek
6a6c08c319
Printf argument checking now supports dynamically-passed precision
...
specifiers.
llvm-svn: 42886
2007-10-12 00:11:27 +00:00
Dan Gohman
be37007e64
Add intrinsics for sin, cos, and pow. These use llvm_anyfloat_ty, and so
...
may be overloaded with vector types. And add a testcase for codegen for
these.
llvm-svn: 42885
2007-10-12 00:01:22 +00:00
Dan Gohman
2a7de41682
Codegen support for vector intrinsics.
...
Factor out the code that expands the "nasty scalar code" for unrolling
vectors into a separate routine, teach it how to handle mixed
vector/scalar operands, as seen in powi, and use it for several operators,
including sin, cos, powi, and pow.
Add support in SplitVectorOp for fpow, fpowi and for several unary
operators.
llvm-svn: 42884
2007-10-11 23:57:53 +00:00
Fariborz Jahanian
49c6425ee6
This patch implementa objective-c's @compatibilty-alias declaration.
...
llvm-svn: 42883
2007-10-11 23:42:27 +00:00
Dale Johannesen
6472eb63c2
Implement ppc long double->uint conversion.
...
Make ppc long double constants print.
llvm-svn: 42882
2007-10-11 23:32:15 +00:00
Dan Gohman
482732af9d
Set ISD::FPOW to Expand.
...
llvm-svn: 42881
2007-10-11 23:21:31 +00:00
Dan Gohman
fd66486950
Add runtime library names for pow.
...
llvm-svn: 42880
2007-10-11 23:09:10 +00:00
Dan Gohman
daee002438
Add an ISD::FPOW node type.
...
llvm-svn: 42879
2007-10-11 23:06:37 +00:00
Dan Gohman
3554448947
Add an explicit target triple to make this test behave as expected on
...
non-Apple hosts. And use the count script instead of wc + grep.
llvm-svn: 42878
2007-10-11 23:04:36 +00:00
Ted Kremenek
3b74526054
Provided accessors to internal allocator for ImutAVLTree and ImmutableSet.
...
Added postfix ++,-- support for ImmutableSet::iterator.
llvm-svn: 42877
2007-10-11 21:51:04 +00:00
Dale Johannesen
62f65edc32
Add missing argument to PALIGNR
...
llvm-svn: 42874
2007-10-11 20:58:37 +00:00
Gabor Greif
cb6832efe0
Fix an assertion abort on sparc. malloc(0) is allowed to
...
return NULL.
llvm-svn: 42871
2007-10-11 19:40:35 +00:00
Arnold Schwaighofer
9ccea99165
Added tail call optimization to the x86 back end. It can be
...
enabled by passing -tailcallopt to llc. The optimization is
performed if the following conditions are satisfied:
* caller/callee are fastcc
* elf/pic is disabled OR
elf/pic enabled + callee is in module + callee has
visibility protected or hidden
llvm-svn: 42870
2007-10-11 19:40:01 +00:00
Arnold Schwaighofer
29cfef59ff
Adding myself
...
llvm-svn: 42869
2007-10-11 18:54:49 +00:00
Chris Lattner
16a0de468f
Push the rewriting APIs along. Build a trivial client that replaces tabs
...
with x's for now. The APIs are all unimplemented, so it doesn't do
anything yet! :)
llvm-svn: 42868
2007-10-11 18:38:32 +00:00
Fariborz Jahanian
d797113659
Implemented parsing of objctive-c protocol conforming type used in
...
an identifier statement. Fixed up pretty priting to print this type
correctly.
llvm-svn: 42866
2007-10-11 18:08:47 +00:00
Dale Johannesen
007aa378ad
Next PPC long double bits. First cut at constants.
...
No compile-time support for constant operations yet,
just format transformations. Make readers and
writers work. Split constants into 2 doubles in
Legalize.
llvm-svn: 42865
2007-10-11 18:07:22 +00:00
Devang Patel
899cc56612
Lower memcpy if it makes sense.
...
llvm-svn: 42864
2007-10-11 17:21:57 +00:00
Chris Lattner
168d63b289
add RewriterTest.cpp to xcode project.
...
llvm-svn: 42863
2007-10-11 16:34:20 +00:00
Chris Lattner
e9ab4ca686
clarify
...
llvm-svn: 42862
2007-10-11 16:06:02 +00:00
Chris Lattner
bbd5530754
make bitvector &= do the right thing if vectors have mismatched length.
...
llvm-svn: 42860
2007-10-11 06:12:33 +00:00
Chris Lattner
fc668d1233
Add a new use_iterator::atEnd() method, which allows us to shrink
...
pred_iterator down to a single ivar.
llvm-svn: 42859
2007-10-11 04:18:11 +00:00
Chris Lattner
f709a1495d
slightly simplify interface
...
llvm-svn: 42858
2007-10-11 03:36:41 +00:00
Anders Carlsson
87c149bf51
Add __builtin_va_start to the list of builtins, make __builtin_va_list available to builtin functions.
...
llvm-svn: 42857
2007-10-11 01:00:40 +00:00
Fariborz Jahanian
70e8f1024a
Patch to create protocol conforming class types.
...
llvm-svn: 42856
2007-10-11 00:55:41 +00:00
Chris Lattner
e99c8329af
add scafolding to play around with and bring up the code rewriter.
...
llvm-svn: 42855
2007-10-11 00:43:27 +00:00
Chris Lattner
5039ac74c7
update argument.
...
llvm-svn: 42854
2007-10-11 00:38:03 +00:00
Chris Lattner
3472aeedfd
rename -parse-ast-view to -ast-view
...
llvm-svn: 42853
2007-10-11 00:37:43 +00:00
Chris Lattner
5e4c75f4ef
rename -parse-ast-print to -ast-print
...
rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only
llvm-svn: 42852
2007-10-11 00:18:28 +00:00
Ted Kremenek
41eee516d7
Added iterators to ImmutableSet.
...
llvm-svn: 42851
2007-10-11 00:14:49 +00:00
Ted Kremenek
6a97cf6d65
Added some doxygen comments to ImmutableSet.
...
llvm-svn: 42850
2007-10-10 23:47:03 +00:00
Chris Lattner
9c7a0361c0
Fix 80 col violations.
...
llvm-svn: 42849
2007-10-10 23:42:28 +00:00
Ted Kremenek
abd77cccb8
Removed uninformative assertions that catch problems that will
...
fire anyway at runtime due to a NULL dereference.
llvm-svn: 42848
2007-10-10 23:35:04 +00:00
Ted Kremenek
4d984579da
Removed "height" of an AVL tree node from its Profile. This is
...
implicitly captured by using the addresses of its children in the
profile.
llvm-svn: 42847
2007-10-10 23:32:01 +00:00
Chris Lattner
7b4ab65c7d
fix a bunch of regressions I introduced :(
...
llvm-svn: 42846
2007-10-10 23:31:03 +00:00
Steve Naroff
783a7a0698
Refinements to Sema::GetObjcIdType()...
...
- Cache the typedef, not the type (avoids importing AST/Type.h).
- Emit an error if "id" cannot be found.
- Comment the routine and add a FIXME to reconsider how we emulate GCC's new fangled behavior. This isn't a priority for now, since almost no code depends on having "id" built-in.
- Add a test.
llvm-svn: 42845
2007-10-10 23:24:43 +00:00
Ted Kremenek
a1cf09f51d
Commented out header with no section body. Will write this eventually.
...
llvm-svn: 42844
2007-10-10 23:22:00 +00:00
Ted Kremenek
035b0cd34a
Added some documentation on clang CFGs. It is very rough.
...
llvm-svn: 42843
2007-10-10 23:01:43 +00:00
Steve Naroff
7f549f1897
- Make sure default return/argument types (for methods) default to "id".
...
- Cache the "id" type in Sema...initialize ObjcIdType and TUScope (oops).
- Fix ActOnInstanceMessage to allow for "id" type receivers...still work to do (next).
llvm-svn: 42842
2007-10-10 21:53:07 +00:00
Chris Lattner
d2b8ce4259
avoid accessing off the end of identifiers.
...
llvm-svn: 42841
2007-10-10 20:59:57 +00:00
Anders Carlsson
db83d77c78
Emit a warning when the body of an if block is a NullStmt.
...
llvm-svn: 42840
2007-10-10 20:50:11 +00:00
Ted Kremenek
4479f86c0f
Removed spurious forward declaration to a structure that will no longer be used.
...
llvm-svn: 42839
2007-10-10 20:45:34 +00:00
Chris Lattner
3ff2e69713
clang -E should not print tokens from the predefines buffer.
...
llvm-svn: 42838
2007-10-10 20:45:16 +00:00
Ted Kremenek
45f3bb8239
Added some doxygen comments to a few methods of ImutAVLTree.
...
llvm-svn: 42837
2007-10-10 20:44:21 +00:00
Hartmut Kaiser
3fa191b6b2
Updated VC++ build system.
...
llvm-svn: 42836
2007-10-10 19:50:45 +00:00
Hartmut Kaiser
04bd66bd43
Updated VC++ build system.
...
llvm-svn: 42835
2007-10-10 19:50:09 +00:00
Ted Kremenek
9e9dae0b57
Added idea for a simple C++ checker.
...
llvm-svn: 42834
2007-10-10 18:52:22 +00:00
Ted Kremenek
6c5107ced1
Added preliminary support for iterators in ImutAVLTree.
...
Implemented ImutAVLTree::isEqual.
llvm-svn: 42833
2007-10-10 18:11:16 +00:00
Chris Lattner
d9c9c919da
Fix CodeGen/Generic/BasicInstrs.llx on sparc by marking divrem
...
illegal. Thanks to gabor for pointing this out!
llvm-svn: 42832
2007-10-10 18:10:57 +00:00
Chris Lattner
a9839f73fb
add an idea
...
llvm-svn: 42831
2007-10-10 18:08:07 +00:00
Chris Lattner
ed2a9eb820
resolve a fixme, by moving __builtin_va_list to a more logical
...
place and making it correctly parameterized on the target.
llvm-svn: 42830
2007-10-10 17:48:53 +00:00
Steve Naroff
8308f60d51
Fix a latent bug in MinimalActions (created by a recent name change).
...
llvm-svn: 42829
2007-10-10 17:45:44 +00:00
Steve Naroff
93eb5f1438
Remove Scope argument from ObjC actions that either don't need it or can now use TUScope.
...
Also improve a recently added comment.
llvm-svn: 42826
2007-10-10 17:32:04 +00:00
Ted Kremenek
0818f6e7e4
Renamed internal method "Create" of ImutAVLTree to "CreateNode".
...
llvm-svn: 42825
2007-10-10 16:27:33 +00:00
Duncan Sands
56ab90d3ad
Correct swapped arguments to getConstant.
...
llvm-svn: 42824
2007-10-10 09:54:50 +00:00
Bill Wendling
f7c7ed2740
Fix 80-column violations
...
llvm-svn: 42823
2007-10-10 05:45:59 +00:00
Dale Johannesen
666323eacd
Next PPC long double bits: ppcf128->i32 conversion.
...
Surprisingly complicated.
Adds getTargetNode for 2 outputs, no inputs (missing).
llvm-svn: 42822
2007-10-10 01:01:31 +00:00
Evan Cheng
a9830a04eb
Bad choice of variable name.
...
llvm-svn: 42821
2007-10-10 00:11:40 +00:00
Evan Cheng
ad55a6079a
Fix an extremely stupid bug that prevented first round of coalescing (physical registers only) from happening.
...
llvm-svn: 42820
2007-10-09 23:36:27 +00:00
Chris Lattner
5d45178179
Add a dummy for the id typedef. Steve, plz fill this in. :)
...
llvm-svn: 42819
2007-10-09 22:58:09 +00:00
Chris Lattner
1f1b0dbc28
Make a significant change to invert the control flow handling
...
predefined macros. Previously, these were handled by the driver,
now they are handled by the preprocessor.
Some fallout of this:
1. Instead of preprocessing two buffers (the predefines, then the
main source file) we now start preprocessing the main source
file and inject the predefines as a "psuedo #include" from the
main source file.
2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify
Preprocessor::isInPrimaryFile.
3. The driver doesn't have to know about standard #defines, the
preprocessor knows, which is nice for people wanting to define
their own drivers.
4. This allows us to put normal tokens in the predefine buffer,
for example a definition for __builtin_va_list that is
target-specific, and a typedef for id in objc.
llvm-svn: 42818
2007-10-09 22:10:18 +00:00
Steve Naroff
c62adb6d1a
Make sure methods with no return type default to "id".
...
This fixes a crasher in Sema::MatchTwoMethodDeclarations(), identified by selector-overload.m (just added).
Added Action::ActOnTranslationUnitScope() and renamed Action::PopScope to ActOnPopScope.
Added a Translation Unit Scope instance variable to Sema (will be very useful to ObjC-related actions, since ObjC declarations are always file-scoped).
llvm-svn: 42817
2007-10-09 22:01:59 +00:00
Ted Kremenek
230c6cc516
Modified XCode project to contain...
...
ADT/DenseSet.h
ADT/ImmutableMap.h
ADT/ImmutableSet.h
llvm-svn: 42816
2007-10-09 21:49:49 +00:00
Chris Lattner
f5ea386698
Add new MemoryBuffer::getMemBufferCopy method.
...
llvm-svn: 42815
2007-10-09 21:46:38 +00:00
Devang Patel
1999d22b7f
Fix indentation.
...
llvm-svn: 42814
2007-10-09 21:41:00 +00:00
Ted Kremenek
12bfa1ccbc
Added implementation of immutable (functional) maps and sets, as
...
implemented on top of a functional AVL tree. The AVL balancing code
is inspired by the OCaml implementation of Map, which also uses a functional
AVL tree.
Documentation is currently limited and cleanups are planned, but this code
compiles and has been tested.
llvm-svn: 42813
2007-10-09 21:38:09 +00:00
Devang Patel
2af23f976b
Do not walk invalid iterator.
...
llvm-svn: 42812
2007-10-09 21:31:36 +00:00
Devang Patel
152f18f671
Recognize while(1) and avoid extra blocks.
...
llvm-svn: 42811
2007-10-09 20:51:27 +00:00
Devang Patel
f8a76755df
new test
...
llvm-svn: 42810
2007-10-09 20:37:41 +00:00
Chris Lattner
87547e6c15
avoid a noop virtual method call on the hot scope poping path.
...
llvm-svn: 42809
2007-10-09 20:37:18 +00:00
Devang Patel
c1380400d5
Recognize "do {} while (0)" idiom and avoid extra basic blocks.
...
llvm-svn: 42808
2007-10-09 20:33:39 +00:00
Devang Patel
7ad0c2f1f9
Use LLVMFoldingBuilder
...
llvm-svn: 42807
2007-10-09 19:49:58 +00:00
Devang Patel
530f975cf0
Add LLVMFoldingBuilder
...
llvm-svn: 42806
2007-10-09 19:49:19 +00:00
Dan Gohman
850ff11022
Remove an unnecessary friend declaration.
...
llvm-svn: 42805
2007-10-09 18:39:48 +00:00
Fariborz Jahanian
eb2b34a9a5
Remove comment about protocols and namespace no longer relevant.
...
llvm-svn: 42804
2007-10-09 18:28:41 +00:00
Fariborz Jahanian
c8e7a93b02
Minor code clean up to make it more readable.
...
llvm-svn: 42803
2007-10-09 18:22:59 +00:00
Chris Lattner
516ca70f5d
Update DeclKind enums to reflect ObjcProtocolDecl's inheritance change.
...
llvm-svn: 42802
2007-10-09 18:18:24 +00:00
Fariborz Jahanian
06f84f5f84
Remove addition of protocol names to declaration scopes, use a separate
...
DenseMap to keep track of such declarations and derive ObjcProtocolDecl
directyly from NamedScope.
llvm-svn: 42801
2007-10-09 18:03:53 +00:00
Chris Lattner
3c69f12cbc
convert driver over to use Token::is/isNot APIs. fwew, all done.
...
llvm-svn: 42800
2007-10-09 18:03:42 +00:00
Chris Lattner
98c1f7cfde
Switch lexer/pp over to new Token::is/isNot api
...
llvm-svn: 42799
2007-10-09 18:02:16 +00:00
Chris Lattner
0ef1352a94
swtich to Token::is/isNot
...
llvm-svn: 42798
2007-10-09 17:51:17 +00:00
Chris Lattner
feb00b6e12
switch more code to use Token::is/isNot where possible.
...
llvm-svn: 42797
2007-10-09 17:41:39 +00:00
Chris Lattner
76c7228ef9
switch some more of the parser over to using Token::is and isNot
...
llvm-svn: 42796
2007-10-09 17:33:22 +00:00
Chris Lattner
0ab032aa8f
Add two new Token helper functions, "is" and "isNot". This allows us to write
...
stuff like this:
// If we don't have a comma, it is either the end of the list (a ';') or
// an error, bail out.
if (Tok.isNot(tok::comma))
break;
instead of:
// If we don't have a comma, it is either the end of the list (a ';') or
// an error, bail out.
if (Tok.getKind() != tok::comma)
break;
There is obviously no functionality change, but the code reads a bit better and is
more terse.
llvm-svn: 42795
2007-10-09 17:23:58 +00:00
Fariborz Jahanian
f483847233
Added better comment about protocol list for class ObjcQualifiedInterfaceType.
...
llvm-svn: 42794
2007-10-09 17:14:13 +00:00
Chris Lattner
a55a2cc25c
rename some "Parse" actions to "ActOn". Move code around in
...
ParseFunctionDefinition so that ActOnFunctionDefBody is always
called if ActOnStartOfFunctionDef is called. This fixes a crash
reported by Nuno Lopes.
llvm-svn: 42793
2007-10-09 17:14:05 +00:00
Devang Patel
eac5948348
Use const& for RHS.
...
Use copy for LHS, because it is incremented using ++ operator.
llvm-svn: 42792
2007-10-09 17:10:59 +00:00
Devang Patel
49a44f3b52
Fix comment. Describe what it is, instead of how it is used.
...
llvm-svn: 42791
2007-10-09 17:08:50 +00:00
Fariborz Jahanian
cb995d8981
Prevent memory leak by not creating a category object when there is a
...
fatal error of category's undefined interface.
llvm-svn: 42790
2007-10-09 17:05:22 +00:00
Chris Lattner
fc16c0a026
update prototype, fixing build error
...
llvm-svn: 42789
2007-10-09 16:27:44 +00:00
Dan Gohman
66966403ce
Pass argc by value, not by reference, since it isn't modified.
...
llvm-svn: 42788
2007-10-09 16:04:57 +00:00
Dan Gohman
e8c8ef5234
LowerIntegerDivOrRem no longer exists.
...
llvm-svn: 42787
2007-10-09 15:45:13 +00:00
Dan Gohman
51554bf30e
Fix grammar in a comment.
...
llvm-svn: 42786
2007-10-09 15:44:37 +00:00
Dan Gohman
6d28778bfd
This is done.
...
llvm-svn: 42785
2007-10-09 15:42:21 +00:00
Dan Gohman
678387a299
These two tests now require only two multiply instructions,
...
instead of four.
llvm-svn: 42784
2007-10-09 15:39:37 +00:00
Evan Cheng
82bc90ac60
Under 64-bit mode use LEA64_32r instead of LEA64r to save a byte.
...
llvm-svn: 42783
2007-10-09 07:14:53 +00:00
Chris Lattner
38d49f5d90
Fix problems where DenseMap used operator!= instead of correctly
...
calling the traits implementation of isEqual.
llvm-svn: 42782
2007-10-09 05:42:12 +00:00
Chris Lattner
5c50f59690
Change a #include into a forward declaration
...
llvm-svn: 42781
2007-10-09 03:40:30 +00:00
Bruno Cardoso Lopes
66d9572ced
Position Independent Code (PIC) support [3]
...
llvm-svn: 42780
2007-10-09 03:15:11 +00:00
Bruno Cardoso Lopes
35d86e60b6
Position Independent Code (PIC) support [2]
...
- Added a function to hold the stack location
where GP must be stored during LowerCALL
- AsmPrinter now emits directives based on
relocation type
- PIC_ set to default relocation type (same as GCC)
llvm-svn: 42779
2007-10-09 03:01:19 +00:00
Bruno Cardoso Lopes
5cef9cfd09
Position Independent Code (PIC) support [1]
...
- Modified instruction format to handle pseudo instructions
- Added LoadAddr SDNode to load symbols.
llvm-svn: 42778
2007-10-09 02:55:31 +00:00
Steve Naroff
8e748cb4e9
Remove 2 protocol related actions from MinimalActions (protocols shouldn't be recognized as types).
...
llvm-svn: 42777
2007-10-08 23:10:47 +00:00
Fariborz Jahanian
da6c012ee7
Added a new class for Interfaces qualified by protocol list.
...
Protocols are now sorted and made unique in the list.
Enhanced pretty printer for @interface (So, I can see the protocol list).
llvm-svn: 42776
2007-10-08 23:06:41 +00:00
Evan Cheng
3b3e6097a3
Update test.
...
llvm-svn: 42775
2007-10-08 22:20:32 +00:00
Evan Cheng
f5ec10b64c
Bug fix. X86 was emitting redundant setcc and test instructions before a conditional move.
...
llvm-svn: 42774
2007-10-08 22:16:29 +00:00
Steve Naroff
b163154c2d
Removed unused instance variable from FieldDecl.
...
llvm-svn: 42773
2007-10-08 21:56:47 +00:00
Chris Lattner
ba9dddb01e
Rename FileVariable -> FileVar for consistency with its class name,
...
likewise block and param. Reorder the layout of the Decl kind enum
so that the inheritance tree is reflected in the ordering. This allows
trivial range comparisons to determine whether something is an instance
of some abstract class, making classof faster.
llvm-svn: 42772
2007-10-08 21:37:32 +00:00
Chris Lattner
15b7278931
add a comment.
...
llvm-svn: 42771
2007-10-08 21:36:22 +00:00
Chris Lattner
6776a8d359
Move identifierTable.h to the right folder.
...
llvm-svn: 42770
2007-10-08 21:35:59 +00:00
Dan Gohman
5942e5a5fb
Call getFunctionNumber() instead of referencing FunctionNumber directly,
...
for consistency.
llvm-svn: 42769
2007-10-08 21:27:12 +00:00
Dan Gohman
ac546cc28f
Mark the prefetch intrinsic as IntrWriteArgMem, instead of the
...
default of IntrWriteMem, to at least indicate that it doesn't
"capture" the argument pointer.
llvm-svn: 42768
2007-10-08 21:15:07 +00:00
Steve Naroff
71c3c1c715
Convert Selector Maps/Sets to use stronger typing (now that we have DenseMapInfo in IdentifierTable.h).
...
llvm-svn: 42767
2007-10-08 21:05:34 +00:00
Devang Patel
1166312e8b
Code gen case statement ranges.
...
llvm-svn: 42766
2007-10-08 20:57:48 +00:00
Dan Gohman
a24b431b27
These two tests now require only three multiply instructions,
...
instead of four.
llvm-svn: 42765
2007-10-08 20:48:12 +00:00
Fariborz Jahanian
e90597f593
Several small patches to do pretty printing for objective-c top-level decls
...
(minimal printing), Derive ObjcClassDecl from Decl. Ted may want to
take note of the change I made to CFGRecStmtDeclVisitor.h
llvm-svn: 42764
2007-10-08 18:53:38 +00:00
Chris Lattner
104c48ab8f
Various improvements to the documentation, contributed by
...
Joshua Haberman!
llvm-svn: 42763
2007-10-08 18:42:45 +00:00
Dan Gohman
a160361c85
Migrate X86 and ARM from using X86ISD::{,I}DIV and ARMISD::MULHILO{U,S} to
...
use ISD::{S,U}DIVREM and ISD::{S,U}MUL_HIO. Move the lowering code
associated with these operators into target-independent in LegalizeDAG.cpp
and TargetLowering.cpp.
llvm-svn: 42762
2007-10-08 18:33:35 +00:00
Evan Cheng
18109c88c3
Allow x86 compare to be commutable by default.
...
llvm-svn: 42761
2007-10-08 18:27:46 +00:00
Gordon Henriksen
44dd8fbd26
C and Objective Caml bindings for PHINode::addIncoming etc.
...
llvm-svn: 42760
2007-10-08 18:14:39 +00:00
Dan Gohman
5c6d0c3b99
DAGCombiner support for UDIVREM/SDIVREM and UMUL_LOHI/SMUL_LOHI.
...
Check if one of the two results unneeded so see if a simpler operator
could bs used. Also check to see if each of the two computations could be
simplified if they were split into separate operators. Factor out the code
that calls visit() so that it can be used for this purpose.
llvm-svn: 42759
2007-10-08 17:57:15 +00:00
Evan Cheng
4c73befe28
LLVM does not use the old style simple isel any more.
...
llvm-svn: 42758
2007-10-08 17:54:24 +00:00
Evan Cheng
acc8b68e5f
Remove debugging printf to get build going on x86-64.
...
llvm-svn: 42757
2007-10-08 17:49:43 +00:00
Fariborz Jahanian
092e34d15b
Removed unnecessary base class from some of objective-c classes:
...
ObjcProtocolDecl is now derived from ScopedDecl. ObjcForwardProtocolDecl from Decl.
ObjcImplementationDecl fom NamedDecl.
llvm-svn: 42756
2007-10-08 17:35:11 +00:00
Dan Gohman
71f0d7d76e
When we start enabling SMUL_LOHI/UMUL_LOHI or SDIVREM/UDIVREM in
...
target-indepenent lowering, don't use them on PowerPC.
llvm-svn: 42755
2007-10-08 17:28:24 +00:00
Fariborz Jahanian
4b2113c281
Return NULL on invalid protocol.
...
llvm-svn: 42754
2007-10-08 16:07:03 +00:00
Dan Gohman
b08c8bfe41
Add convenience overloads of SelectionDAG::getNode that take a SDVTList
...
and individual SDOperand operands.
llvm-svn: 42753
2007-10-08 15:49:58 +00:00
Dan Gohman
2c6a821fd7
Move the space in overview output for commands out of each of the
...
commands and into the common code.
llvm-svn: 42752
2007-10-08 15:45:12 +00:00
Dan Gohman
afedc063ab
Simplify getIntPtrType, allowing it to work for arbitrary pointer sizes.
...
llvm-svn: 42751
2007-10-08 15:16:25 +00:00
Dan Gohman
5e79a6108f
Use correct parentheses with the '&& "..."' idiom in an assert.
...
llvm-svn: 42750
2007-10-08 15:13:30 +00:00
Dan Gohman
fadf40a655
In -debug mode, dump SelectionDAGs both before and after the
...
optimization passes.
llvm-svn: 42749
2007-10-08 15:12:17 +00:00
Dan Gohman
ea3c73629f
Fix grammar in a comment.
...
llvm-svn: 42748
2007-10-08 15:10:04 +00:00
Dan Gohman
13ab93efde
Add explicit keywords.
...
llvm-svn: 42747
2007-10-08 15:08:41 +00:00
Neil Booth
49c6aab7b8
Use APInt::tcExtract. It's cleaner, and works :)
...
llvm-svn: 42746
2007-10-08 14:39:42 +00:00
Neil Booth
b618216e56
Add a new function tcExtract for extracting a bignum from an
...
arbitrary range of bits embedded in the middle of another bignum.
This kind of operation is desirable in many cases of software
floating point, e.g. converting bignum integers to floating point
numbers of fixed precision (you want to extract the precision most
significant bits).
Elsewhere, add an assertion, and exit the shift functions early if
the shift count is zero.
llvm-svn: 42745
2007-10-08 13:47:12 +00:00
Gordon Henriksen
acf684315e
Fixed downrev Ocaml compatibility.
...
llvm-svn: 42744
2007-10-08 12:16:59 +00:00
Owen Anderson
74529b7d5f
Begin the process of allowing DomTree on MBB's. Step One: template DomTreeNode by making it a typedef of a templated DomTreeNodeBase.
...
llvm-svn: 42743
2007-10-08 07:44:39 +00:00
Evan Cheng
21a58a72c5
Kill cycle of an live range is always the last use index + 1.
...
llvm-svn: 42742
2007-10-08 06:59:30 +00:00
Chris Lattner
bcd30bb0cd
Allow passes to just pass up "FunctionPass(&ID)" instead of "FunctionPass((intptr_t)&ID)"
...
llvm-svn: 42741
2007-10-08 03:45:44 +00:00
Gordon Henriksen
783f7bbabd
C and Objective Caml bindings for getFunction and getNamedGlobal. Also enhanced
...
the Objective Caml 'declare_*' functions to behave more or less like
getOrInsertFunction.
llvm-svn: 42740
2007-10-08 03:45:09 +00:00
Chris Lattner
b20757d578
disable this entirely: it is causing use of invalidated iterators and infinite looping.
...
llvm-svn: 42739
2007-10-07 22:00:31 +00:00
Chris Lattner
8dd66ab3b2
Fix many regressions on x86 by avoiding dereferencing the end iterator.
...
llvm-svn: 42738
2007-10-07 21:53:12 +00:00
Chris Lattner
7cdae91966
Finish off PR1723, by working around some strange compiler bug.
...
llvm-svn: 42737
2007-10-07 17:57:10 +00:00
Gordon Henriksen
751ebf7b9a
C and Objective Caml bindings for GlobalVariable::isConstant.
...
llvm-svn: 42736
2007-10-07 17:31:42 +00:00
Neil Booth
03f58ab706
Add back convertFromSignExtendedInteger.
...
llvm-svn: 42735
2007-10-07 12:15:41 +00:00
Neil Booth
ba205229e7
Now that convertFromUnsignedParts has a sane, constant interface,
...
convertFromZeroExtendedInteger can be simplified as it doesn't need
to make a copy of the source bignum.
llvm-svn: 42734
2007-10-07 12:10:57 +00:00
Neil Booth
6c1c8588ae
Reimplement convertFromUnsignedInteger so it is passed a const bignum.
...
It used to modify its argument in-place.
This interface is saner and the implementation more efficient. It will
be needed for decimal->binary conversion.
llvm-svn: 42733
2007-10-07 12:07:53 +00:00
Neil Booth
5f00973393
convertFromInteger, as originally written, expected sign-extended
...
input. APInt unfortunately zero-extends signed integers, so Dale
modified the function to expect zero-extended input. Make this
assumption explicit in the function name.
llvm-svn: 42732
2007-10-07 11:45:55 +00:00
Chris Lattner
c330d008f4
remove unneeded #include
...
llvm-svn: 42731
2007-10-07 08:59:27 +00:00
Chris Lattner
ef6b136781
move IdentifierTable.h from liblex to libbasic.
...
llvm-svn: 42730
2007-10-07 08:58:51 +00:00
Neil Booth
d3985924f4
combineLostFractions does not need to be a member function
...
llvm-svn: 42729
2007-10-07 08:51:21 +00:00
Chris Lattner
4894f485c7
implement the Token class in the Lexer.cpp file instead of IdentifierInfo.cpp
...
llvm-svn: 42728
2007-10-07 08:47:24 +00:00
Chris Lattner
c43ddc84a3
improve layering:
...
Now instead of IdentifierInfo knowing anything about MacroInfo,
only the preprocessor knows. This makes MacroInfo truly private
to the Lex library (and its direct clients) instead of being
accessed in the Basic library.
llvm-svn: 42727
2007-10-07 08:44:20 +00:00
Chris Lattner
259716a6e1
change calls to getMacroInfo into hasMacroDefinition() where possible.
...
llvm-svn: 42726
2007-10-07 08:04:56 +00:00
Chris Lattner
d7b971bf3d
add a hasMacroDefinition() method to IdentifierInfo, strength reduce a
...
call to getMacroInfo to call it.
llvm-svn: 42725
2007-10-07 07:57:27 +00:00
Chris Lattner
f49523d6ea
update comment.
...
llvm-svn: 42724
2007-10-07 07:54:23 +00:00
Chris Lattner
ff067ce555
Remove the PPID bitfield from IdentifierInfo, shrinking it by a word
...
(because all bitfields now fit in 32 bits). This shrinks the identifier
table for carbon.h from 1634428 to 1451424 bytes (12%) and has no impact
on compile time.
llvm-svn: 42723
2007-10-07 07:52:34 +00:00
Chris Lattner
a441ca651f
First step to fixing a long lived layering violation: this
...
moves the MacroInfo pointer to a side hash table (which currently
lives in IdentifierTable.cpp). This removes a pointer from
Identifier info, but doesn't shrink it, as it requires a new bit
be added. This strange approach with the 'hasmacro' bit is needed
to not lose preprocessor performance.
llvm-svn: 42722
2007-10-07 07:09:52 +00:00
Chris Lattner
65cc87ffc2
The identifier shouldn't be added to the scope, the decl should.
...
This fixes strange assertions that just started triggering.
llvm-svn: 42721
2007-10-07 07:05:08 +00:00
Chris Lattner
65fc0f1fca
classof isn't right. This is causing assertion failures somehow now.
...
llvm-svn: 42720
2007-10-07 07:04:41 +00:00
Chris Lattner
730160d32f
Shrink the builtinID down by 3 bits, allowing all the bitfields to
...
fit in 32-bits, shrinking IdentifierInfo by a word.
This shrinks the total size of the identifier pool from
1817264 to 1634428 bytes (11%) on carbon.h.
llvm-svn: 42719
2007-10-07 06:29:32 +00:00
Chris Lattner
d1cdee7d1f
Rename ASTStreamers.* -> ASTConsumers.*
...
llvm-svn: 42718
2007-10-07 06:04:32 +00:00
Daniel Berlin
fb6a79cdd5
Some more problems noticed by Curtis
...
llvm-svn: 42717
2007-10-07 04:47:57 +00:00
Chris Lattner
5700fab189
simplify the interfaces to create selectors: getSelector can take any
...
number of arguments now and does the right thing, but the nullary/unary
accessors are preserved as convenience functions. This allows us to
slightly simplify clients.
llvm-svn: 42716
2007-10-07 02:00:24 +00:00
Chris Lattner
f7f34d09e4
simplify some Selector interfaces.
...
llvm-svn: 42715
2007-10-07 01:33:16 +00:00
Chris Lattner
ee2d84133c
move ImplementationClassInfo out of ASTContext into Sema.
...
llvm-svn: 42714
2007-10-07 01:13:46 +00:00
Gordon Henriksen
ffb4876cfb
C and Objective Caml bindings for PATypeHolder.
...
llvm-svn: 42713
2007-10-07 00:13:35 +00:00
Chris Lattner
efc0b5e372
add comments.
...
llvm-svn: 42712
2007-10-06 23:30:21 +00:00
Chris Lattner
6a2b09ecd9
switch ObjcCategoryImplDecl over to being a NamedDecl, remove dead ctor argument.
...
llvm-svn: 42711
2007-10-06 23:12:31 +00:00
Chris Lattner
a4016555d2
introduce a new NamedDecl class, switch a couple of things over to using it.
...
NamedDecl is a Decl that has an IdentifierInfo (for example, ScopedDecl),
but not ObjcMethodDecl.
Simplify some code in ActOnAddMethodsToObjcDecl, by doing the cast from
DeclTy to Decl at the start of the method.
llvm-svn: 42710
2007-10-06 22:53:46 +00:00
Chris Lattner
18d3a13bef
Every decl has a SourceLocation, move the location info into the Decl class instead of being in subclasses.
...
llvm-svn: 42709
2007-10-06 22:16:01 +00:00
Kevin
6261e98ea8
future notes & minor changes
...
llvm-svn: 42708
2007-10-06 21:28:47 +00:00
Gordon Henriksen
c3d661a0ee
Bindings for the verifier.
...
llvm-svn: 42707
2007-10-06 21:00:36 +00:00
Chris Lattner
ae0ec1d09f
simplify the interface to create ObjcClassDecl's.
...
llvm-svn: 42706
2007-10-06 20:08:36 +00:00
Chris Lattner
11eca782a3
simplify the interface for creating ObjcForwardProtocolDecl
...
llvm-svn: 42705
2007-10-06 20:05:59 +00:00
Chris Lattner
f0d15d470f
add a missing ;
...
llvm-svn: 42704
2007-10-06 19:08:22 +00:00
Chris Lattner
5ccf60fc44
stub out some printing of objc decls.
...
llvm-svn: 42703
2007-10-06 18:52:10 +00:00
Gordon Henriksen
8689fa69e2
Deleting some unnecessary glue.
...
llvm-svn: 42702
2007-10-06 17:10:44 +00:00
Gordon Henriksen
fc560cef9a
Adopting a uniform naming convention for type constructors in
...
bindings (part le deux).
llvm-svn: 42701
2007-10-06 16:56:09 +00:00
Anton Korobeynikov
67ac2de8bf
Oops, I really wanted to commit this part also :)
...
llvm-svn: 42700
2007-10-06 16:39:43 +00:00
Anton Korobeynikov
c59496f737
Move merge code into new helper function.
...
llvm-svn: 42699
2007-10-06 16:17:49 +00:00
Gordon Henriksen
ed7beaa3fa
Adopting a uniform naming convention for type constructors in bindings.
...
llvm-svn: 42698
2007-10-06 16:05:20 +00:00
Gordon Henriksen
1046c73d12
Adopting a uniform naming convention for constant constructors in bindings.
...
llvm-svn: 42697
2007-10-06 15:11:06 +00:00
Gordon Henriksen
7ce3176696
Adding C and Ocaml bindings for ConstantExpr.
...
llvm-svn: 42696
2007-10-06 14:29:36 +00:00
Anton Korobeynikov
8d8f94c278
Include DataTypes.h to provide intptr_t type. This fixes OpenBSD compilation of this file.
...
Inspired by Laurence Tratt's patch
llvm-svn: 42695
2007-10-06 13:07:11 +00:00
Evan Cheng
0de312dd7d
Reapply 42677.
...
llvm-svn: 42692
2007-10-06 08:19:55 +00:00
Evan Cheng
8ff5335bb6
Oops. Forgot this.
...
llvm-svn: 42691
2007-10-06 08:09:29 +00:00
Neil Booth
32897f5eb0
Cleaner, more general exponent output.
...
llvm-svn: 42690
2007-10-06 07:29:25 +00:00
Chris Lattner
b2d486a357
speed up clang startup another 28% by avoiding std::vector<std::string>
...
for holding builtin target-specific macros.
llvm-svn: 42689
2007-10-06 06:57:34 +00:00
Chris Lattner
b5fc6fbcfc
speed up clang startup time by about 23% by avoiding lots of
...
stringmap operations when there are no secondary targets.
llvm-svn: 42688
2007-10-06 06:29:41 +00:00
Chris Lattner
2a9bcb9ea7
silence warnings in no-assert build.
...
llvm-svn: 42687
2007-10-06 06:13:42 +00:00
Chris Lattner
82217bd155
revert evan's patch until the header is committed
...
llvm-svn: 42686
2007-10-06 06:08:17 +00:00
Chris Lattner
17b1330b04
fix grammaro
...
llvm-svn: 42685
2007-10-06 05:48:57 +00:00
Chris Lattner
a1513f7198
edits
...
llvm-svn: 42684
2007-10-06 05:42:47 +00:00
Chris Lattner
25d8a70dc3
fix accidental commit
...
llvm-svn: 42683
2007-10-06 05:38:32 +00:00
Chris Lattner
609ca3ec97
edits
...
llvm-svn: 42682
2007-10-06 05:30:19 +00:00
Chris Lattner
01607a94c0
various minor edits, e.g. & -> &
...
llvm-svn: 42681
2007-10-06 05:23:00 +00:00
Kevin
eddf1f0966
New directory.
...
llvm-svn: 42680
2007-10-06 05:15:30 +00:00
Chris Lattner
48ce755498
add a warning.
...
llvm-svn: 42679
2007-10-06 05:13:47 +00:00
Chris Lattner
8c03979f91
minor edits
...
llvm-svn: 42678
2007-10-06 05:09:04 +00:00
Evan Cheng
f4b5d491df
Added DAG xforms. e.g.
...
(vextract (v4f32 s2v (f32 load $addr)), 0) -> (f32 load $addr)
(vextract (v4i32 bc (v4f32 s2v (f32 load $addr))), 0) -> (i32 load $addr)
Remove x86 specific patterns.
llvm-svn: 42677
2007-10-06 02:46:29 +00:00
Bill Wendling
bc03521fc9
Fix spacing issues.
...
llvm-svn: 42676
2007-10-06 01:56:01 +00:00
Bill Wendling
650dcf6027
Just say "No" to non-ASCII things.
...
llvm-svn: 42675
2007-10-06 01:53:09 +00:00
Bill Wendling
3ef6b60eeb
Remove non-ASCII '
...
llvm-svn: 42674
2007-10-06 01:44:57 +00:00
Kevin
4fbcd6c01b
1. May fix encoding issues: server uses UTF; HTML file assumes Western (ISO 8859-1).
...
2. Added strict doctype.
Closing out tags like <br/> and <meta.../> may still be a problem (necessary for XHTML, but wrong for HTML)....
llvm-svn: 42673
2007-10-06 01:28:23 +00:00
Dale Johannesen
f864ac96d8
Next powerpc long double bits. Comparisons work,
...
although not well, and shortening FP converts.
llvm-svn: 42672
2007-10-06 01:24:11 +00:00
Dale Johannesen
bcfa7c1255
Make test work on non-x86 hosts.
...
llvm-svn: 42671
2007-10-06 01:22:39 +00:00
Neil Booth
c8b650ab14
Fix and clarify some comments.
...
llvm-svn: 42670
2007-10-06 00:43:45 +00:00
Neil Booth
0ea72a9a91
Generalize tcFullMultiply so that the operands can be of differing
...
part widths. Also, return the number of parts actually required to
hold the result's value.
Remove an over-cautious condition from rounding of float->hex conversion.
llvm-svn: 42669
2007-10-06 00:24:48 +00:00
Gordon Henriksen
1d0d24c4fd
Wrapping Value::dump.
...
llvm-svn: 42668
2007-10-06 00:08:49 +00:00
Gordon Henriksen
7330acdec7
Removing the silly CHelpers header by rolling wrap and unwrap into the C
...
bindings headers themselves, hidden behind #ifdef __cplusplus.
llvm-svn: 42666
2007-10-05 23:59:36 +00:00
Evan Cheng
5ee9cf6bca
Test case for 3-address conversion.
...
llvm-svn: 42664
2007-10-05 23:33:09 +00:00
Ted Kremenek
8a7bf82206
Modifications to XCode project:
...
- Added include/Analysis/ExprDeclBitVector.h
- Added include/Analysis/ProgramEdge.h
- Removed include/Analysis/Visitors/DataflowStmtVisitor.h
llvm-svn: 42663
2007-10-05 23:32:54 +00:00
Ted Kremenek
fd8d8ca214
Removed DataflowStmtVisitor. It is no longer used, and is obsoleted
...
by newer visitor interfaces.
llvm-svn: 42662
2007-10-05 23:27:24 +00:00
Evan Cheng
1151ffde70
Commute x86 cmove instructions by swapping the operands and change the condition
...
to its inverse.
Testing this as llcbeta
llvm-svn: 42661
2007-10-05 23:13:21 +00:00
Evan Cheng
42a13757de
This is done.
...
llvm-svn: 42656
2007-10-05 22:34:59 +00:00
Evan Cheng
484cab7a2f
Enable convertToThreeAddress for X86 by default.
...
llvm-svn: 42655
2007-10-05 22:31:10 +00:00
Devang Patel
a69f987b66
Fix bug in updating dominance frontier after loop
...
unswitch when frontier includes basic blocks that
are not inside loop.
llvm-svn: 42654
2007-10-05 22:29:34 +00:00
Evan Cheng
d3ccf00870
INC64_32r -> LEA64_32r is better than INC64_32r -> LEA32r, but it still can
...
cause performance degradation.
llvm-svn: 42653
2007-10-05 21:55:32 +00:00
Kevin
9f413446de
A message on the main page about bulding clang.
...
llvm-svn: 42652
2007-10-05 21:44:03 +00:00
Kevin
aa4692883a
new site -- the rest of it
...
llvm-svn: 42651
2007-10-05 21:18:52 +00:00
Kevin
32a4c17af9
new site
...
llvm-svn: 42650
2007-10-05 21:17:52 +00:00
Fariborz Jahanian
ea7a98d8d6
This is the first patch toward supporting protocol conforming
...
objective-c types. It also removes use of Scope* parameter in
getObjCProtocolDecl.
llvm-svn: 42649
2007-10-05 21:01:53 +00:00
Devang Patel
64a9ca7c58
Support case statement ranges.
...
llvm-svn: 42648
2007-10-05 20:54:07 +00:00
Evan Cheng
fa2c828687
In 64-bit mode, avoid using leal with 32-bit 32-bit address size, e.g.
...
leal 1(%ecx), %edi, which requires 67H prefix.
llvm-svn: 42647
2007-10-05 20:34:26 +00:00
Kevin
e5be925a22
Per request... about to make changes to the website.
...
llvm-svn: 42646
2007-10-05 20:31:57 +00:00
Chris Lattner
dadc762ac5
Implement DenseMapInfo for Selector, allowing use of DenseMap/DenseSet of
...
Selector's instead of requiring void* to be used. I converted one use of
DenseSet<void*> over to use DenseSet<Selector> but the others should change
as well.
llvm-svn: 42645
2007-10-05 20:15:24 +00:00
Dale Johannesen
c0154c06d6
First round of ppc long double. call/return and
...
basic arithmetic works.
Rename RTLIB long double functions to distinguish
different flavors of long double; the lib functions
have different names, alas.
llvm-svn: 42644
2007-10-05 20:04:43 +00:00
Steve Naroff
e61bfa8bb4
Layering refinements for selectors (suggested by Chris). Specifics...
...
- Add SelectorTable, which enables us to remove MultiKeywordSelector from the public header.
- Remove FoldingSet from IdentifierInfo.h and Preprocessor.h.
- Remove Parser::ObjcGetUnarySelector and Parser::ObjcGetKeywordSelector, they are subsumed by SelectorTable.
- Add MultiKeywordSelector to IdentifierInfo.cpp.
- Move a bunch of selector related methods from ParseObjC.cpp to IdentifierInfo.cpp.
- Added some comments.
llvm-svn: 42643
2007-10-05 18:42:47 +00:00
Evan Cheng
aac0f8e351
Add support to convert more 64-bit instructions to 3-address instructions.
...
llvm-svn: 42642
2007-10-05 18:20:36 +00:00
Fariborz Jahanian
458f7114db
Patch for 1) Checking for duplicate methods decls in intterface and category.
...
2) Use of the new DenseSet<t> abstractions instead of DenseMap<t,char>.
llvm-svn: 42641
2007-10-05 18:00:57 +00:00
Evan Cheng
97eba74a52
ADC and SBB uses EFLAGS.
...
llvm-svn: 42640
2007-10-05 17:59:57 +00:00
Chris Lattner
f85527e131
Mark count method const.
...
llvm-svn: 42639
2007-10-05 17:40:38 +00:00
Dan Gohman
43c29dce18
Change a few more spaces to tabs in assembly output.
...
llvm-svn: 42638
2007-10-05 15:58:41 +00:00
Dan Gohman
b074f23dff
Change a space to a tab in the assembly output of a .globl directive
...
for consistency.
llvm-svn: 42637
2007-10-05 15:54:58 +00:00
Dan Gohman
12334acbfb
Legalize support for MUL_LOHI and DIVREM.
...
llvm-svn: 42636
2007-10-05 14:17:22 +00:00
Dan Gohman
2682bb6df2
Fix a typo in a comment.
...
llvm-svn: 42635
2007-10-05 14:11:58 +00:00
Dan Gohman
1a77dfba15
Provide names for MUL_LOHI and DIVREM operators.
...
llvm-svn: 42634
2007-10-05 14:11:04 +00:00
Dan Gohman
3c2c1c3cce
SMUL_LOHI and UMUL_LOHI are commutative.
...
llvm-svn: 42633
2007-10-05 14:09:33 +00:00
Dan Gohman
5b89b1ef8f
Define target-indepenent SDNode types for multiply and divide that
...
produce two results.
llvm-svn: 42632
2007-10-05 14:07:56 +00:00
Duncan Sands
99452793ac
Fix typo in comment.
...
llvm-svn: 42631
2007-10-05 10:37:00 +00:00
Evan Cheng
a8a9c15e30
Testing convertToThreeeAddress as X86 llcbeta.
...
llvm-svn: 42630
2007-10-05 08:04:01 +00:00
Daniel Berlin
f86366ec2d
Fix intersectWithComplement bug noticed by Curtis Dunham
...
Optimize |= case for empty RHS
llvm-svn: 42629
2007-10-05 05:10:53 +00:00
Evan Cheng
90a4185b5f
New test case.
...
llvm-svn: 42628
2007-10-05 01:44:22 +00:00
Evan Cheng
84d0ebc10a
Chain producing nodes cannot be moved, not chain reading nodes.
...
llvm-svn: 42627
2007-10-05 01:42:35 +00:00
Evan Cheng
991cf47221
Oops. Didn't mean to leave this in.
...
llvm-svn: 42626
2007-10-05 01:39:40 +00:00
Evan Cheng
79e9713b11
If a node that defines a physical register that is expensive to copy. The
...
scheduler will try a number of tricks in order to avoid generating the
copies. This may not be possible in case the node produces a chain value
that prevent movement. Try unfolding the load from the node before to allow
it to be moved / cloned.
llvm-svn: 42625
2007-10-05 01:39:18 +00:00
Evan Cheng
a851e2b92e
Added storeRegToAddr, loadRegFromAddr, and unfoldMemoryOperand's.
...
llvm-svn: 42624
2007-10-05 01:34:55 +00:00
Evan Cheng
6912b50958
Not needed any more.
...
llvm-svn: 42623
2007-10-05 01:34:14 +00:00
Evan Cheng
1ef9edce5f
Forgot these.
...
llvm-svn: 42622
2007-10-05 01:33:45 +00:00
Evan Cheng
f4cf5dcdd2
- Added a few target hooks to generate load / store instructions from / to any
...
address (not just from / to frameindexes).
- Added target hooks to unfold load / store instructions / SDNodes into separate
load, data processing, store instructions / SDNodes.
llvm-svn: 42621
2007-10-05 01:32:41 +00:00
Evan Cheng
4852303bdb
Add a variant of getTargetNode() that takes a vector of MVT::ValueType.
...
llvm-svn: 42620
2007-10-05 01:10:49 +00:00
Evan Cheng
fd11ef4665
Silence a warning.
...
llvm-svn: 42619
2007-10-05 01:09:32 +00:00
Devang Patel
da5d6bbc40
switch statement code gen.
...
llvm-svn: 42616
2007-10-04 23:45:31 +00:00
Daniel Berlin
f5009110bf
Fix the previous bug a slightly different way (by modifying how find_next works)
...
llvm-svn: 42613
2007-10-04 21:27:17 +00:00
Daniel Berlin
c1973961c9
Fix off by one error in iterator
...
llvm-svn: 42612
2007-10-04 21:18:20 +00:00
Fariborz Jahanian
9081457cbf
this patch accomodates clattner's comments on expression processing in @try-statement.
...
llvm-svn: 42611
2007-10-04 20:19:06 +00:00
Bill Wendling
eaa909f08e
Support Objective C++ too.
...
llvm-svn: 42610
2007-10-04 18:47:25 +00:00
Bill Wendling
c20518d0df
Added testcase for creation of metadata with null pointers.
...
llvm-svn: 42609
2007-10-04 18:46:06 +00:00
Fariborz Jahanian
76aff36d64
More tab removal activity.
...
llvm-svn: 42608
2007-10-04 17:06:28 +00:00
Chris Lattner
1f2b5f0e13
add a note.
...
llvm-svn: 42607
2007-10-04 15:47:27 +00:00
Bill Wendling
2fba4a85ea
un-XFAIL this test.
...
llvm-svn: 42606
2007-10-04 09:33:08 +00:00
Daniel Berlin
ffffead7df
It helps a lot when you check for the end of your list before randomly
...
dereferencing things.
llvm-svn: 42605
2007-10-04 05:29:36 +00:00
Daniel Berlin
2738730c0f
Make SparseBitVector::set actually work properly when sets are not in ascending or descending order.
...
llvm-svn: 42604
2007-10-04 05:25:51 +00:00
Chris Lattner
01d7f489a9
minor cleanups, make code more defensive, less branchy in Selector ctor.
...
llvm-svn: 42603
2007-10-04 05:21:22 +00:00
Chris Lattner
0f26288998
fix an incorrect assertion
...
llvm-svn: 42602
2007-10-04 05:16:42 +00:00
Fariborz Jahanian
673414067b
Fixed tabs in couple of sources.
...
llvm-svn: 42601
2007-10-04 00:45:27 +00:00
Fariborz Jahanian
c9cd8a185d
Fixed all my recent test cases to have the RUN command and
...
fixed consequence of these changes in clang.
llvm-svn: 42600
2007-10-04 00:22:33 +00:00
Gordon Henriksen
14d7680b00
Do use the actual ocaml stdlib (not the install dir) to find the
...
caml/*.h headers.
llvm-svn: 42599
2007-10-04 00:07:50 +00:00
Neil Booth
8f1946fa22
Add APFloat -> hexadecimal string conversion, as per %a and %A in C99.
...
Useful for diagnostics and debugging.
llvm-svn: 42598
2007-10-03 22:26:02 +00:00
Chris Lattner
644e1b7a10
minor cleanup
...
llvm-svn: 42596
2007-10-03 22:03:06 +00:00
Chris Lattner
02cbd095dd
move DeclObjc.h down to be alphabetically organized
...
llvm-svn: 42594
2007-10-03 21:56:39 +00:00
Owen Anderson
8313e75ea7
Completely merge the implementation details of DomTree and PostDomTree.
...
Also, add a FIXME for a bug in PostDomTree calculation I noticed while writing this,
llvm-svn: 42593
2007-10-03 21:25:45 +00:00
Owen Anderson
87337924d5
Add a GraphTraits partial specialization to make the inverse of an inverse be the same as the underlying graph.
...
llvm-svn: 42592
2007-10-03 21:24:38 +00:00
Devang Patel
3574759d85
Fix 80 col violation.
...
llvm-svn: 42591
2007-10-03 21:17:43 +00:00
Devang Patel
e192e32577
Refactor code in a separate method.
...
llvm-svn: 42590
2007-10-03 21:16:08 +00:00
Chris Lattner
99f6ab7e4c
Add initial iterator support for folding set.
...
llvm-svn: 42589
2007-10-03 21:12:09 +00:00
Chris Lattner
f0e5011d21
Clarify that shifts that are too large are undefined.
...
llvm-svn: 42588
2007-10-03 21:01:14 +00:00
Steve Naroff
4810c3a1d6
Finish renaming ObjC declaration actions.
...
Add comments.
Switch to new indentation style for the Action class. Since many actions take many arguments, the new style will...
- make it easier to add/remove arguments without messing up the indentation...
- make it easier to add comments to each argument (see ActOnMethodDeclaration for an example)...
- in general, just makes it easier to see what is being passed.
The rest of Actions will be converted "lazily"...there is no immediate need to hack all the existing methods.
llvm-svn: 42587
2007-10-03 21:00:46 +00:00
Chris Lattner
8c41ed61d1
Simplify implementation of the FoldingSet circular list, a necessary step
...
to giving it iterators.
llvm-svn: 42586
2007-10-03 20:45:43 +00:00
Dan Gohman
c731c97fac
Use empty() member functions when that's what's being tested for instead
...
of comparing begin() and end().
llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Dan Gohman
8c43e41d9b
Fix a using namespace llvm; in a header file.
...
llvm-svn: 42584
2007-10-03 19:04:09 +00:00
Bill Wendling
354504060c
Temporarily XFAIL this test.
...
llvm-svn: 42583
2007-10-03 17:46:54 +00:00
Dale Johannesen
9d559cfff5
Tone down an overzealous optimization.
...
llvm-svn: 42582
2007-10-03 17:45:27 +00:00
Chris Lattner
87a3dbe743
remove extraneous tag
...
llvm-svn: 42581
2007-10-03 17:34:29 +00:00
Chris Lattner
6a6fb7f7b7
remove misleading documentation: LLVM has no atomic support yet.
...
llvm-svn: 42580
2007-10-03 17:33:51 +00:00
Chris Lattner
4bdb84fe53
add a note
...
llvm-svn: 42579
2007-10-03 17:10:03 +00:00
Tanya Lattner
30f65fe4a7
Fix PR1719, by not marking llvm.global.annotations internal.
...
llvm-svn: 42578
2007-10-03 17:05:40 +00:00
Fariborz Jahanian
6cc3803f0b
Renamed getCatLoc() to getLocation() to be consistant for such
...
getter names.
llvm-svn: 42577
2007-10-03 16:23:52 +00:00
Neil Booth
1ca1f80b38
Tweak RoundAwayFromZero the bit number below which is truncated, and make
...
it const.
Preparation for APFloat -> hexadecimal string conversion.
llvm-svn: 42576
2007-10-03 15:16:41 +00:00
Gordon Henriksen
80f35e0d4c
Regenerate.
...
llvm-svn: 42575
2007-10-03 12:07:14 +00:00
Gordon Henriksen
485739d801
Fixing a typo in configure.ac.
...
Patch by Adam Goode.
llvm-svn: 42574
2007-10-03 12:06:41 +00:00
Chris Lattner
4d4e9cdb62
add a note
...
llvm-svn: 42573
2007-10-03 06:10:59 +00:00
Chris Lattner
b511029eaf
testcase for PR1647
...
llvm-svn: 42570
2007-10-03 05:29:07 +00:00
Chris Lattner
d66e0cd6c0
Fix PR1719, by not marking llvm.noinline internal.
...
llvm-svn: 42565
2007-10-03 03:59:15 +00:00
Chris Lattner
21ba176c4b
Bill's example is still not enough to repro this, but it has other issues that
...
seem significant as well.
llvm-svn: 42564
2007-10-03 03:40:24 +00:00
Owen Anderson
b60f254975
Factor some code from the DomTree and PostDomTree calculate methods up into
...
each one's runOnFunction method.
llvm-svn: 42563
2007-10-03 03:20:17 +00:00
Ted Kremenek
88b7439a8c
Fixed bug where intrusive_ptr_add_ref and intrusive_ptr_release were
...
not declared "static inline."
Removed member templates for operator= and copy constructor. They simply
didn't work as expected.
Fixed reference counting bug when a smart pointer is assigned the
value of another smart pointer that refers to the same address.
llvm-svn: 42562
2007-10-03 00:48:55 +00:00
Steve Naroff
0c37b0cb5a
Rename several ObjC action methods to use the "ActOn" prefix (still a few more to do).
...
Remove Action::ObjCStartCategoryInterface/ObjCFinishInterface - they are unused.
.
llvm-svn: 42559
2007-10-02 22:39:18 +00:00
Fariborz Jahanian
b75640c9f1
Unified SuperClass field name in an objective-c class.
...
llvm-svn: 42556
2007-10-02 22:12:45 +00:00
Fariborz Jahanian
b8d9e088a7
Unified such names as protocol references, instance methods and class methods
...
and their accessors in a variety of objective-c classes.
llvm-svn: 42555
2007-10-02 22:05:16 +00:00
Bill Wendling
3efc0758ae
Another micro-opt.
...
llvm-svn: 42554
2007-10-02 21:49:31 +00:00
Steve Naroff
d174155204
Remove Action::ActOnImpleIvarVsClassIvars(), it is only called by Sema (not Parser).
...
Add Sema::CheckImplementationIvars() to replace the previous action.
llvm-svn: 42553
2007-10-02 21:43:37 +00:00
Bill Wendling
f214ff8701
Another missed optimization with LICM.
...
llvm-svn: 42552
2007-10-02 21:43:06 +00:00
Bill Wendling
855011e5c6
Small label changes.
...
llvm-svn: 42549
2007-10-02 21:02:53 +00:00
Bill Wendling
4eb7ca4b4c
Now with source code.
...
llvm-svn: 42548
2007-10-02 21:01:16 +00:00
Bill Wendling
96ed3bb2d4
Now with LL code!
...
llvm-svn: 42547
2007-10-02 20:54:32 +00:00
Bill Wendling
9c4d61b523
Another missed optimization.
...
llvm-svn: 42546
2007-10-02 20:42:59 +00:00
Steve Naroff
f5a55c5a9f
Rename ObjcInterfaceDecl::getIsForwardDecl() to isForwardDecl().
...
Rename ObjcProtocolDecl::getIsForwardProtoDecl() to isForwardDecl().
Rename ObjcInterfaceDecl::setIsForwardDecl() to setForwardDecl().
Rename ObjcProtocolDecl::setIsForwardProtoDecl() to setForwardDecl().
Two reasons:
#1 : boolean predicates should start with "is".
#2 : Since these two sets of methods represent the same concept, they should be named the same (polymorphism is good:-)
llvm-svn: 42545
2007-10-02 20:26:23 +00:00
Fariborz Jahanian
adf84f3f3c
Previously, I warned those methods not implemented in implementation class/category.
...
Now, I also warn those class/categories which are incomplete because of this.
llvm-svn: 42544
2007-10-02 20:06:01 +00:00
Steve Naroff
c6814ea670
- Add ObjcInterfaceDecl::lookupInstanceMethod(), lookupClassMethod().
...
- Add ObjcMessageExpr::getSelector(), getClassName().
- Change Sema::getObjCInterfaceDecl() to simply take an IdentifierInfo (no Scope needed).
- Remove FIXME for printing ObjCMessageExpr's.
llvm-svn: 42543
2007-10-02 20:01:56 +00:00
Bill Wendling
88ea107fdb
Micro-optimization -- missed LICM opportunity.
...
llvm-svn: 42542
2007-10-02 19:55:05 +00:00
Gordon Henriksen
a3fc412d82
Updating my credits entry.
...
llvm-svn: 42541
2007-10-02 18:04:24 +00:00
Dale Johannesen
dd89d2758e
Document new sqrt and powi handling.
...
llvm-svn: 42540
2007-10-02 17:47:38 +00:00
Dale Johannesen
4d4e77af8e
Rewrite sqrt and powi to use anyfloat. By popular demand.
...
llvm-svn: 42537
2007-10-02 17:43:59 +00:00
Fariborz Jahanian
19d765fa6c
ObjcCategoryDecl Does not subclass from ScopedDecl any more.
...
Ted may want to take a look at the change I made at
FGRecStmtDeclVisitor.h.
llvm-svn: 42535
2007-10-02 17:36:55 +00:00
Ted Kremenek
190b1ed4fc
Moved ProgramEdge out out include/.../Analysis/PathSensitive to include/.../Analysis, as it is now used by the FlowSensitive subsystem as well.
...
Removed "Edge" nested class by CFG, as it is now subsumed by ProgramEdge.
Adjusted DataflowSolver and DataflowValues to use ProgramEdges instead
of CFG::Edge.
llvm-svn: 42534
2007-10-02 17:12:02 +00:00
Gordon Henriksen
da5d5b57bf
Regenerate.
...
llvm-svn: 42533
2007-10-02 16:42:22 +00:00
Gordon Henriksen
3be1f10097
Providing --with-ocaml-libdir for ./configure. The default is the
...
stdlib if it's beneath --prefix, and is libdir/ocaml otherwise.
If someone has a better way than this to test whether $B is a path
within $A, I'd love to hear it:
if test "$A" \< "$B" -a "$B" \< "${A}~"
llvm-svn: 42532
2007-10-02 16:42:10 +00:00
Fariborz Jahanian
89b8ef92be
This patch introduces the ObjcCategoryImplDecl class and does the checking related to
...
unimplemented methods in category implementation.
llvm-svn: 42531
2007-10-02 16:38:50 +00:00
Ted Kremenek
a6d930a925
Added DenseMapInfo traits for ProgramEdges
...
llvm-svn: 42530
2007-10-02 16:38:05 +00:00
Gordon Henriksen
acc2a838fa
Regenerate.
...
llvm-svn: 42529
2007-10-02 10:14:42 +00:00
Gordon Henriksen
61400d1192
Fixing (harmless) typos.
...
llvm-svn: 42528
2007-10-02 10:14:32 +00:00
Gordon Henriksen
e61dd67a2b
Regenerate.
...
llvm-svn: 42527
2007-10-02 09:50:32 +00:00
Gordon Henriksen
d48f4598a4
Add explicit --enable-bindings option to configure.
...
llvm-svn: 42526
2007-10-02 09:50:18 +00:00
Steve Naroff
b6c0518d11
Use Identifier::getLength() instead of strlen() in Selector::getName() and MultiKeywordSelector::getName().
...
llvm-svn: 42524
2007-10-02 02:01:22 +00:00
Devang Patel
18c2fa7225
Fix test.
...
llvm-svn: 42522
2007-10-02 00:47:43 +00:00
Owen Anderson
888477339e
Fix typo.
...
llvm-svn: 42521
2007-10-02 00:44:20 +00:00
Owen Anderson
d263cfa1c0
Mention memdep in the AA documentation.
...
llvm-svn: 42519
2007-10-02 00:43:25 +00:00
Devang Patel
0d4958f1b0
New test.
...
llvm-svn: 42517
2007-10-02 00:39:19 +00:00
Hartmut Kaiser
9f4dee8973
Added a missing #include.
...
llvm-svn: 42516
2007-10-02 00:36:52 +00:00
Tanya Lattner
cf316c2eb7
If the user did not check out LLVM and request it to be built, it should be a build error. This relies on the user having a successful build of LLVM, but the tests will fail if they dont.
...
llvm-svn: 42514
2007-10-02 00:19:27 +00:00
Steve Naroff
bf81db14c5
Add comment to ObjcClassDecl.
...
Move ObjcClassDecl to be next to ObjcForwardProtocolDecl. Since they are very similar, might want to unify their names (e.g. ObjcForwardClassDecl).
Change indentation of ObjcForwardProtocolDecl to conform to everything else in DeclObjC.h.
llvm-svn: 42513
2007-10-02 00:10:42 +00:00
Hartmut Kaiser
587cc42864
Updated VC++ build system.
...
llvm-svn: 42512
2007-10-01 23:57:52 +00:00
Evan Cheng
1f79ba6fe6
Refactor code to add load / store folded instructions -> register only
...
instructions reverse map.
llvm-svn: 42509
2007-10-01 23:44:33 +00:00
Dale Johannesen
b6c05b1f90
Fix stride computations for long double arrays.
...
llvm-svn: 42508
2007-10-01 23:08:35 +00:00
Steve Naroff
e5e25fae1d
Add comments for ObjC Decl's.
...
Removed a constructor that was #if 0's out.
Added a FIXME for fariborz...categories shouldn't inherit from ScopedDecl.
llvm-svn: 42507
2007-10-01 22:54:34 +00:00
Dan Gohman
9765cc3bbb
Move the code that emits the .file directives so that it runs after the
...
SourceFiles list is fully filled in so that it sees all of the files.
llvm-svn: 42506
2007-10-01 22:40:20 +00:00
Evan Cheng
89ca5b091f
-pre-RA-sched=none, simple, simple-noitin are gone.
...
llvm-svn: 42505
2007-10-01 22:17:20 +00:00
Devang Patel
e595d107e6
PR 1603 test case.
...
llvm-svn: 42502
2007-10-01 21:22:57 +00:00
Evan Cheng
a3a67596f6
Remove simple scheduler.
...
llvm-svn: 42499
2007-10-01 20:44:07 +00:00
Ted Kremenek
fb4750b639
Migrated LiveVariables and UninitializedVariables to now use the
...
tracked BlkExpr information now maintained by the CFG class.
llvm-svn: 42498
2007-10-01 20:33:52 +00:00
Ted Kremenek
f2d4372ba9
CFG objects now internally store a (lazily created) map from block-level
...
expressions to IDs. This is used by various dataflow analyses, but is
also useful for anyone querying a CFG to determine where an expression
is evaluated.
llvm-svn: 42495
2007-10-01 19:33:33 +00:00
Steve Naroff
67391b8a54
Move ObjC decls to DeclObjC.h, a new AST header.
...
Update clients and add to project file.
llvm-svn: 42494
2007-10-01 19:00:59 +00:00
Devang Patel
2a60ff1aeb
Relax unsafe use check. If there is one unconditional use inside the loop then it is safe to promote value even if there is another conditional use inside the loop.
...
llvm-svn: 42493
2007-10-01 18:12:58 +00:00
Evan Cheng
a1b7e95039
Typo. X86comi doesn't read / write chain's.
...
llvm-svn: 42492
2007-10-01 18:12:48 +00:00
Fariborz Jahanian
ebb34d7141
Moved two bitfields back to top of class ObjcMethodDecl so they pack
...
with those in their base class. In response to clattner's
September 30, 2007 12:54:49 AM PDT email.
llvm-svn: 42491
2007-10-01 17:19:59 +00:00
Fariborz Jahanian
f26702eb54
Took care of clatter's suggestions, dated.
...
September 30, 2007 12:36:58 AM PDT and
September 30, 2007 12:50:05 AM PDT
llvm-svn: 42490
2007-10-01 16:53:59 +00:00
Ted Kremenek
7f74e13535
Removed "hasImplicitControlFlow" from class CFG, and moved it to class Stmt
...
as a member function. This function is no longer needed within the CFG
class, and logically belongs to the Stmt class as a predicate for a
Stmt instance.
llvm-svn: 42489
2007-10-01 16:34:52 +00:00
Dale Johannesen
28e19a48ce
Add getABITypeSize, getABITypeSizeInBits
...
llvm-svn: 42488
2007-10-01 16:03:14 +00:00
Dan Gohman
9b943453f5
Add empty() member functions to a few container-like classes.
...
llvm-svn: 42487
2007-10-01 16:01:23 +00:00
Dale Johannesen
c0855f8a88
remove dup comment
...
llvm-svn: 42486
2007-09-30 19:08:12 +00:00
Fariborz Jahanian
a725bf7782
Unused ObjcProtoMethod is removed.
...
llvm-svn: 42485
2007-09-30 18:53:32 +00:00
Dale Johannesen
9150652b21
Constant fold int-to-long-double conversions;
...
use APFloat for int-to-float/double; use
round-to-nearest for these (implementation-defined,
seems to match gcc).
llvm-svn: 42484
2007-09-30 18:19:03 +00:00
Dale Johannesen
28a2c4a9c4
Simplify and fix signed int -> FP conversions.
...
llvm-svn: 42483
2007-09-30 18:17:01 +00:00
Gordon Henriksen
0b7cf862bc
AsmPrinters overriding getAnalysisUsage should call super.
...
And not super's super, either.
llvm-svn: 42482
2007-09-30 13:39:29 +00:00
Chris Lattner
2b6abdce50
Add a new getLength() method to IdentifierInfo, which relies on a newly added
...
method to StringMapEntry. Steve, please use this to remove the
strlen calls in selector processing.
llvm-svn: 42481
2007-09-30 08:32:27 +00:00
Chris Lattner
b06396c588
Add a helper useful when mapping from a map element to its hash node.
...
llvm-svn: 42480
2007-09-30 08:31:46 +00:00
Chris Lattner
6c44b9f145
Fix a bug I just introduced.
...
llvm-svn: 42479
2007-09-30 08:31:00 +00:00
Chris Lattner
90c26ba9de
improve comment.
...
llvm-svn: 42478
2007-09-30 08:13:22 +00:00
Chris Lattner
4730430bd8
simplify an expression
...
llvm-svn: 42477
2007-09-30 08:01:04 +00:00
Owen Anderson
46ade4eb9b
Template-ize more of the DomTree internal implementation details. Only the calculate() methods for DomTree and PostDomTree remain to be merged/template-ized.
...
llvm-svn: 42476
2007-09-30 04:17:16 +00:00
Chris Lattner
bd0079c603
document DenseSet.
...
llvm-svn: 42475
2007-09-30 00:58:59 +00:00
Chris Lattner
18a9273e61
Add a new DenseSet abstraction.
...
llvm-svn: 42474
2007-09-30 00:47:20 +00:00
Fariborz Jahanian
0886d252d7
This patch fixes all issues mentioned in clattner's feedback of
...
September 28, 2007 4:39:24 PM PDT
Please let me know if I missed anything.
llvm-svn: 42473
2007-09-29 18:24:58 +00:00
Fariborz Jahanian
ec7b3333e1
Code clean up. Moved couple of static functions to be private members of Sema class.
...
Avoiding passing a Sema object to these utility functions.
llvm-svn: 42472
2007-09-29 17:14:55 +00:00
Fariborz Jahanian
fa0667b547
Patch to remove use of has table for protocol name lookup. This patch mirrors my
...
previous patch to do the same for class name lookup using a hash table.
llvm-svn: 42471
2007-09-29 17:04:06 +00:00
Duncan Sands
7b908dda92
Add newline at end of file.
...
llvm-svn: 42470
2007-09-29 16:38:37 +00:00
Duncan Sands
f72ff0c379
Check that the second parameter of init_trampoline
...
can be resolved to a function. This is required
for codegen and used by instcombine.
llvm-svn: 42469
2007-09-29 16:25:54 +00:00
Gordon Henriksen
f5aa229ede
This is done already.
...
llvm-svn: 42467
2007-09-29 02:23:08 +00:00
Gordon Henriksen
37ca83d4e9
Collector is the base class for garbage collection code generators.
...
This version enhances the previous patch to add root initialization
as discussed here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053455.html
Collector gives its subclasses control over generic algorithms:
unsigned NeededSafePoints; //< Bitmask of required safe points.
bool CustomReadBarriers; //< Default is to insert loads.
bool CustomWriteBarriers; //< Default is to insert stores.
bool CustomRoots; //< Default is to pass through to backend.
bool InitRoots; //< If set, roots are nulled during lowering.
It also has callbacks which collectors can hook:
/// If any of the actions are set to Custom, this is expected to
/// be overriden to create a transform to lower those actions to
/// LLVM IR.
virtual Pass *createCustomLoweringPass() const;
/// beginAssembly/finishAssembly - Emit module metadata as
/// assembly code.
virtual void beginAssembly(Module &M, std::ostream &OS,
AsmPrinter &AP,
const TargetAsmInfo &TAI) const;
virtual void finishAssembly(Module &M,
CollectorModuleMetadata &CMM,
std::ostream &OS, AsmPrinter &AP,
const TargetAsmInfo &TAI) const;
Various other independent algorithms could be implemented, but were
not necessary for the initial two collectors. Some examples are
listed here:
http://llvm.org/docs/GarbageCollection.html#collector-algos
llvm-svn: 42466
2007-09-29 02:13:43 +00:00
Gordon Henriksen
6547e5a2bc
Demoting CHelpers.h to include/llvm/Support.
...
llvm-svn: 42465
2007-09-29 01:38:42 +00:00
Fariborz Jahanian
343f7098db
Removed use of hash table for class decls and do a name look up directly.
...
There is still an issue if doing ScopedLookup is an overkill and we can
just access the decl using the identifier.
llvm-svn: 42463
2007-09-29 00:54:24 +00:00
Daniel Berlin
342181c51d
Switch to densemap rather than std::set
...
llvm-svn: 42462
2007-09-29 00:50:40 +00:00
Gordon Henriksen
2717f3bd60
Regenerate.
...
llvm-svn: 42461
2007-09-29 00:42:56 +00:00
Gordon Henriksen
da70a73f28
PR1601: etags not configured correctly
...
Resolving this by deleting vestigal etags remnants.
llvm-svn: 42460
2007-09-29 00:42:21 +00:00
Evan Cheng
5fb5a1f389
Enabling new condition code modeling scheme.
...
llvm-svn: 42459
2007-09-29 00:00:36 +00:00
Devang Patel
f96df8d777
Do not ignore packed member size while selecting union type.
...
llvm-svn: 42458
2007-09-28 23:54:26 +00:00
Dan Gohman
a90183e7d1
Teach SplitVectorOp how to split INSERT_VECTOR_ELT.
...
llvm-svn: 42457
2007-09-28 23:53:40 +00:00
Steve Naroff
92866f4fbb
Add some comments to MultiKeywordSelector, make all methods private, add a friend, move some methods around.
...
llvm-svn: 42456
2007-09-28 23:39:26 +00:00
Ted Kremenek
1b61261a25
Added ProgramEdge.h, which defines ProgramEdge (and subclasses) that
...
encapsulate a program point within a CFG for use by our path-sensitive
dataflow solver.
llvm-svn: 42455
2007-09-28 23:15:21 +00:00
Tanya Lattner
586eb8ee47
Update how to release document.
...
Add release version to getting started guide.
llvm-svn: 42454
2007-09-28 22:50:54 +00:00
Evan Cheng
a5e595d23a
If two instructions are both two-address code, favors (schedule closer to
...
terminator) the one that has a CopyToReg use. This fixes
2006-05-11-InstrSched.ll with -new-cc-modeling-scheme.
llvm-svn: 42453
2007-09-28 22:32:30 +00:00
Steve Naroff
8017506d9c
Yesterday I discovered that 78% of all selectors in "Cocoa.h" take 0/1 argument.
...
This motivated implementing a devious clattner inspired solution:-)
This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema).
This change was critical to make now, before we have too many clients.
I still need to add some comments to the Selector class...will likely add later today/tomorrow.
llvm-svn: 42452
2007-09-28 22:22:11 +00:00
Devang Patel
8ec4f837fa
Do not codegen dummy block.
...
Dummy block is an empty block with no predecessors.
llvm-svn: 42451
2007-09-28 21:49:18 +00:00
Ted Kremenek
14851c3de3
Fixed bug where assignments to variables wrapped in parentheses would not
...
properly kill variables. e.g:
(x) = 1;
llvm-svn: 42450
2007-09-28 21:29:33 +00:00
Ted Kremenek
a1c256dd0e
Fixed UninitializedValues to properly propagate uninitialized "taint"
...
in assignment operations of the form +=, -=, *=, etc.
llvm-svn: 42449
2007-09-28 21:08:51 +00:00
Chris Lattner
8861abe6f2
really fix PR1581, thanks to Daniel Dunbar for pointing
...
this out.
llvm-svn: 42448
2007-09-28 20:50:50 +00:00
Ted Kremenek
a6ef56e6d2
DeadStores no longer reports warnings for stores to non-local variables.
...
llvm-svn: 42447
2007-09-28 20:48:41 +00:00
Ted Kremenek
0064ff47e6
Significant cleanups and bug-fixes to LiveVariables. Uses new refactored
...
ExprDeclBitVector class for defining dataflow state.
llvm-svn: 42446
2007-09-28 20:38:59 +00:00
Ted Kremenek
254c126c15
Refactored ExprDeclBitVector into two classes:
...
DeclBitVector
ExprDeclBitVector (which subclasses the former)
DeclBitVector is for analyses that just want to track bitvector state
for declarations.
ExprDeclBitVector is for analyses that want to track bitvector state
for both both declarations and CFGBlock-level expressions.
llvm-svn: 42445
2007-09-28 20:12:10 +00:00
Chris Lattner
2be9ec5c91
Make Value::getNameLen not crash on an empty name, fixing PR1712.
...
llvm-svn: 42444
2007-09-28 20:09:40 +00:00
Evan Cheng
f72693f36e
Remove a poor scheduling heuristic.
...
llvm-svn: 42443
2007-09-28 19:37:35 +00:00
Evan Cheng
038dcc5136
Trim some unneeded fields.
...
llvm-svn: 42442
2007-09-28 19:24:24 +00:00
Dale Johannesen
03d4ad9f03
Record latest work.
...
llvm-svn: 42441
2007-09-28 18:46:28 +00:00
Dale Johannesen
789b5a505b
Fix long double -> uint64 conversion.
...
llvm-svn: 42440
2007-09-28 18:44:17 +00:00
Dale Johannesen
6bf69ed3cc
minor long double related changes
...
llvm-svn: 42439
2007-09-28 18:06:58 +00:00
Ted Kremenek
483e305210
Fixed bug where declaration initializer expressions were not
...
traversed by the visitor.
llvm-svn: 42438
2007-09-28 17:55:50 +00:00
Ted Kremenek
07eff9a2fe
Added iterator mechanism to iterator over the decls and expressions
...
tracked by an ExprDeclBitVector analysis.
llvm-svn: 42437
2007-09-28 17:55:22 +00:00
Fariborz Jahanian
b75db4cc8c
Patch to warn on umimplemented methods coming from class's
...
protocols.
llvm-svn: 42436
2007-09-28 17:40:07 +00:00
Dan Gohman
25d506c41b
Make the checks for DW_FORM_data4 consistent with the others, and
...
add more such code for DIEDwarfLabel::SizeOf and DIEObjectLabel::SizeOf.
llvm-svn: 42435
2007-09-28 16:50:28 +00:00
Dan Gohman
0d23d63b9e
Use 32-bit data directives for DW_FORM_data4 format data, even on
...
targets with 64-bit addresses.
llvm-svn: 42434
2007-09-28 15:43:33 +00:00
Rafael Espindola
6c04ac1db0
Refactor the memcpy lowering for the x86 target.
...
The only generated code difference is that now we call memcpy when
the size of the array is unknown. This matches GCC behavior and is
better since the run time value can be arbitrarily large.
llvm-svn: 42433
2007-09-28 12:53:01 +00:00
Evan Cheng
1f516560d1
Stop inventing new words. :-)
...
llvm-svn: 42429
2007-09-28 01:35:02 +00:00
Owen Anderson
d0d5c11d18
Remove unneeded #include.
...
llvm-svn: 42428
2007-09-28 01:25:07 +00:00
Owen Anderson
0fbef94cd0
Have PostDomTree use the newly templated DFSPass.
...
llvm-svn: 42427
2007-09-28 01:23:47 +00:00
Evan Cheng
edfc5b2204
Pessimisively assume ADJCALLSTACKDOWN / ADJCALLSTACKUP (which becomes sub / add) clobbers EFLAGS.
...
llvm-svn: 42426
2007-09-28 01:19:48 +00:00
Dale Johannesen
25a00a63eb
Add sqrt and powi intrinsics for long double.
...
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Dale Johannesen
1d1d0e7735
Don't do SRA for unions with long double fields.
...
Fixes a SWB crash.
llvm-svn: 42422
2007-09-28 00:21:38 +00:00
Ted Kremenek
f91d1c92ba
Fixed several bugs in the propagation of "uninitialized value"
...
taintness across expressions.
Made "smart-culling" of taint propagation (for error reporting)
correctly handle conditional expressions and a few other edge cases.
llvm-svn: 42421
2007-09-28 00:09:38 +00:00
Owen Anderson
ee73e0b8cb
Convert DFSPass into a templated friend function, in preparation for making it common to DomTree and PostDomTree.
...
llvm-svn: 42420
2007-09-27 23:23:00 +00:00
Dan Gohman
a1d46c7d0a
TargetAsmInfo::getAddressSize() was incorrect for x86-64 and 64-bit targets
...
other than PPC64. Instead of fixing it, just remove it and fix all the
places that use it to use TargetData::getPointerSize() instead, as there
aren't very many. Most of the references were in DwarfWriter.cpp.
llvm-svn: 42419
2007-09-27 23:12:31 +00:00
Gordon Henriksen
613afce430
CollectorMetadata abstractly describes stack maps for a function.
...
It includes:
- location and of each safe point in machine code (identified by a
label)
- location of each root within the stack frame (identified by an
offset), including the metadata tag provided to llvm.gcroot in
the user program
- size of the stack frame (for collectors which want to cheat on
stack crawling :)
- and eventually will include liveness
It is to be populated by back-ends during code-generation.
CollectorModuleMetadata aggregates this information across the
entire module.
llvm-svn: 42418
2007-09-27 22:18:46 +00:00
Evan Cheng
99dc695da5
Use GR64 in 64-bit mode.
...
llvm-svn: 42417
2007-09-27 21:50:05 +00:00
Fariborz Jahanian
fa80e80da9
Patch to use case-stmt for keywords used as selectgor names.
...
llvm-svn: 42416
2007-09-27 19:52:15 +00:00
Gordon Henriksen
658c57eb66
My previous Registry.h header, as well as Collectors.h, which is the
...
registry for dynamically-loaded garbage collection compiler plugins.
llvm-svn: 42415
2007-09-27 19:34:27 +00:00
Gordon Henriksen
0076a6727e
GarbageCollection.html is expanded to encompass the coming
...
capabilities. This is a major rewrite and is easier to read en toto
rather than patchwise.
llvm-svn: 42414
2007-09-27 19:31:36 +00:00
Evan Cheng
5a71402be6
Doh. Calls clobber EFLAGS.
...
llvm-svn: 42413
2007-09-27 19:01:55 +00:00
Fariborz Jahanian
f6546b38b2
Patch for method implementation. It populates ObjcImplementationDecl object with method implementation declarations .
...
It checks and warns on those methods declared in class interface and not implemented.
llvm-svn: 42412
2007-09-27 18:57:03 +00:00
Steve Naroff
65ca537b55
Fix bug in SelectorInfo::getName() - method buffer needs to be passed by reference.
...
llvm-svn: 42411
2007-09-27 18:52:21 +00:00
Evan Cheng
e6f92253f5
Avoid inserting a live register more than once.
...
llvm-svn: 42410
2007-09-27 18:46:06 +00:00
Ted Kremenek
b9ce295b0a
Created new "ExprDeclBitVector" type bundle for dataflow analyses that need boolean
...
values associated with ScopedDecls and CFGBlock-level Exprs. This is the common
boilerplate needed by UninitializedValues and LiveVariables.
Refactored UninitializedValues to use ExprDeclBitVector.
Shortened the string diagnostic for UninitializedValues.
llvm-svn: 42408
2007-09-27 18:20:22 +00:00
Tanya Lattner
0d675ee06e
Couple of fixes to mention bunzip2 and make instructions more clear.
...
llvm-svn: 42407
2007-09-27 18:14:33 +00:00
Devang Patel
f68d3e1a0d
While searching for appropriate place for temporaries, do not over-incerement iterator.
...
llvm-svn: 42406
2007-09-27 18:02:47 +00:00
Devang Patel
11611f876e
Mention Loop Index Split
...
llvm-svn: 42405
2007-09-27 17:32:04 +00:00
Chris Lattner
d2bc9d8c77
new testcase for PR1708
...
llvm-svn: 42398
2007-09-27 15:47:16 +00:00
Daniel Berlin
a447de7065
Ignore redundant constraints
...
llvm-svn: 42397
2007-09-27 15:42:23 +00:00
Chris Lattner
cc61bf5e0c
Fix some use of uninit variables issues, reported by Anton.
...
llvm-svn: 42396
2007-09-27 15:15:46 +00:00
Steve Naroff
f73590dbb1
Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits:
...
#1 : It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable.
#2 : It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%.
#3 : It results in many API simplifications. Here are some highlights:
- Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages).
- Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo).
- Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured).
I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later.
Thanks to Chris for talking this through with me and suggesting this approach.
llvm-svn: 42395
2007-09-27 14:38:14 +00:00
Nick Lewycky
3934961878
Build the correct range for loops with unusual bounds. Fix from Jay Foad.
...
llvm-svn: 42394
2007-09-27 14:12:54 +00:00
Bill Wendling
c9a8c74d28
No, really, it *is* SSSE3. ;-)
...
llvm-svn: 42393
2007-09-27 08:47:31 +00:00
Duncan Sands
a1779909ff
SSSE3 -> SSE3. Reported by Alex Kellett.
...
llvm-svn: 42392
2007-09-27 08:24:36 +00:00
Duncan Sands
2f060736e2
Grammer fix reported by Alex Kellett.
...
llvm-svn: 42391
2007-09-27 08:24:02 +00:00
Evan Cheng
75439b3b78
Silence a compiler warning.
...
llvm-svn: 42389
2007-09-27 07:35:39 +00:00
Evan Cheng
bde499be60
Boogs.
...
llvm-svn: 42388
2007-09-27 07:29:27 +00:00
Evan Cheng
1ec79b41db
Be smarter about which node to force schedule. Reduce # of duplications + copies; Added statistics.
...
llvm-svn: 42387
2007-09-27 07:09:03 +00:00
Gordon Henriksen
eb42c4e221
Remove debugging.
...
llvm-svn: 42385
2007-09-27 02:47:27 +00:00
Evan Cheng
cfd5f82890
Backtracking only when it won't create a cycle.
...
llvm-svn: 42384
2007-09-27 00:25:29 +00:00
Dale Johannesen
34aa41c475
Make temporaries explicit to avoid premature
...
destruction of compiler-created ones.
llvm-svn: 42383
2007-09-26 23:20:33 +00:00
Gordon Henriksen
43b66447f4
Updating LLVM.xcodeproj.
...
llvm-svn: 42382
2007-09-26 22:44:45 +00:00
Chris Lattner
e6d9ca5443
objc messages have side effects, return true from hasLocalSideEffect,
...
fixing:
VoidMethod.m:14:5: warning: expression result unused
[Greeter hello];
^~~~~~~~~~~~~~~
llvm-svn: 42380
2007-09-26 22:06:30 +00:00
Evan Cheng
478134e5f4
Oops. Forgot this.
...
llvm-svn: 42377
2007-09-26 21:38:03 +00:00
Ted Kremenek
d80ee7d287
Added extra guard for null Stmt* when traversing the AST using VisitChildren.
...
Added assertion that Block-level statements should not be NULL.
llvm-svn: 42376
2007-09-26 21:36:20 +00:00
Evan Cheng
8e136a9dc4
- Move getPhysicalRegisterRegClass() from ScheduleDAG to MRegisterInfo.
...
- Added ability to emit cross class register copies to the BBRU scheduler.
- More aggressive backtracking.
llvm-svn: 42375
2007-09-26 21:36:17 +00:00
Neil Booth
0fa3ea79ac
Whitespace cleanup.
...
llvm-svn: 42374
2007-09-26 21:35:05 +00:00
Neil Booth
9acbf5aaf9
Whitespace and compiler warning cleanup.
...
llvm-svn: 42373
2007-09-26 21:33:42 +00:00
Evan Cheng
8728c3376a
- Added MRegisterInfo::getCrossCopyRegClass() hook. For register classes where reg to reg copies are not possible, this returns another register class which registers in the specified register class can be copied to (and copy back from).
...
- X86 copyRegToReg() now supports copying between EFLAGS and GR32 / GR64 registers.
llvm-svn: 42372
2007-09-26 21:31:07 +00:00
Evan Cheng
b93de587cb
Some assemblers do not recognize aliases pushfd, pushfq, popfd, and popfq. Just emit them as pushf and popf.
...
llvm-svn: 42371
2007-09-26 21:28:00 +00:00
Ted Kremenek
5c50fd1add
Fixed two bugs in CFG construction:
...
BUG 1)
CFG failed to build for empty functions, or functions containing only
NullStmts or empty compound statements.
We now handle such cases, although now we cannot test for CFG
construction failure by asserting that the last block constructed is
not NULL (since it now may be).
BUG 2)
CFG construction segfaulted on some cases when walking the AST and not
taking into account that some children of a statement may be NULL.
llvm-svn: 42370
2007-09-26 21:23:31 +00:00
Dale Johannesen
b805d35d16
Modernize fabs.ll, add long double. Add tests
...
for direct codegen of fsin/fcos.
llvm-svn: 42369
2007-09-26 21:12:10 +00:00
Dale Johannesen
b6d56401aa
Enable codegen for long double abs, sin, cos
...
llvm-svn: 42368
2007-09-26 21:10:55 +00:00
Gordon Henriksen
c23b66c58b
Added C and Ocaml bindings for functions, basic blocks, and
...
instruction creation. No support yet for instruction introspection.
Also eliminated allocas from the Ocaml bindings for portability,
and avoided unnecessary casts.
llvm-svn: 42367
2007-09-26 20:56:12 +00:00
Ted Kremenek
0883fd5817
Removed option "-parse-ast-check" from clang driver. This is now implemented
...
using "-parse-ast -verify".
Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.
Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.
llvm-svn: 42365
2007-09-26 20:14:22 +00:00
Ted Kremenek
a054c5bedd
Moved "VerifyDiagnostics" variable declaration to right below ProgAction
...
declaration. This is because this option is logically tightly connected
to the actions defined in ProgAction.
llvm-svn: 42364
2007-09-26 19:42:19 +00:00
Ted Kremenek
cbd2af8a0a
Removed inclusion of <memory>, which is no longer needed since we
...
aren't used auto_ptr's anymore.
llvm-svn: 42363
2007-09-26 19:41:07 +00:00
Ted Kremenek
8742a45565
Refactored driver so that any action that is implemented using an
...
ASTConsumer can also be verified using the diagnostics checker. From
the command line, users may activate diagnostic checking using the
"-verify" option. For example, "clang -verify -warn-dead-stores"
checks if the warnings flagged by the dead store checker match those
in the comments.
Note that we still have the option "-parse-ast-check" for backwards
comptability with existing test cases. This option is now equivalent to
"-parse-ast -verify".
llvm-svn: 42362
2007-09-26 18:39:29 +00:00
Fariborz Jahanian
2a4dd316a0
This patch inserts ivars declared in @implementation in its object and verifies
...
that they conform(in type, name and numbers) to those declared in @interface.
Test case highlights kind of checking we do here.
llvm-svn: 42360
2007-09-26 18:27:25 +00:00
Dale Johannesen
f04d37d3a9
Fix f80 UNDEF.
...
llvm-svn: 42359
2007-09-26 17:26:49 +00:00
Fariborz Jahanian
19529eec8a
Removed a few TODOs on things which are done.
...
llvm-svn: 42358
2007-09-26 17:03:44 +00:00
Duncan Sands
755d9306a3
X86 -> X86-32 in appropriate places.
...
llvm-svn: 42357
2007-09-26 16:24:52 +00:00
Duncan Sands
47fc0a2a5f
Various cleanups. Especially, EH is turned on by default!
...
llvm-svn: 42356
2007-09-26 15:59:54 +00:00
Chris Lattner
f13af33221
ok ok we get it. CBE and vectors don't like each other yet.
...
llvm-svn: 42355
2007-09-26 15:50:21 +00:00
Chris Lattner
4480f42166
be less redundantly redundant.
...
llvm-svn: 42354
2007-09-26 15:48:33 +00:00
Duncan Sands
0bcbceb647
Test the C front-end, not the C++ front-end.
...
llvm-svn: 42350
2007-09-26 07:28:20 +00:00
Chris Lattner
31d319dce7
make old crappy browsers produce less crappy output :)
...
llvm-svn: 42349
2007-09-26 06:38:59 +00:00
Evan Cheng
b4b352656a
Typos: POPQ -> POPFQ, POPD -> POPFD.
...
llvm-svn: 42348
2007-09-26 06:38:29 +00:00
Chris Lattner
c9e7b8ec50
move PR1160 here.
...
llvm-svn: 42347
2007-09-26 06:29:31 +00:00
Evan Cheng
c1e4e3743b
Allow copyRegToReg to emit cross register classes copies.
...
Tested with "make check"!
llvm-svn: 42346
2007-09-26 06:25:56 +00:00
Chris Lattner
fef69f5b4a
move PR1264 here.
...
llvm-svn: 42345
2007-09-26 06:15:48 +00:00
Chris Lattner
d0382a8550
noone uses etags. Connected to PR1601
...
llvm-svn: 42344
2007-09-26 06:10:47 +00:00
Chris Lattner
828eb3b91f
we support attribute(noinline) now :)
...
llvm-svn: 42343
2007-09-26 06:04:15 +00:00
Chris Lattner
8e06116b8a
update bugs list
...
llvm-svn: 42342
2007-09-26 06:01:35 +00:00
Chris Lattner
4734a358fd
now with more prose.
...
llvm-svn: 42341
2007-09-26 05:44:21 +00:00
Duncan Sands
9b626f0ada
Test that local variables are aligned as the user requested.
...
llvm-svn: 42338
2007-09-26 04:04:29 +00:00
Evan Cheng
0a6f47cff9
Add pushf{d|q}, popf{d|q} to push and pop EFLAGS register.
...
llvm-svn: 42335
2007-09-26 01:29:06 +00:00
Chris Lattner
f7ab334803
Handle (int)1.0e40 as an i-c-e.
...
llvm-svn: 42334
2007-09-26 00:47:26 +00:00
Evan Cheng
9b7f0e6eb4
translateX86CC updates the last two operands.
...
llvm-svn: 42333
2007-09-26 00:45:55 +00:00
Anton Korobeynikov
e291f727e3
Correctly restore stack pointer after realignment in main() on Cygwin/Mingw32
...
llvm-svn: 42332
2007-09-26 00:13:34 +00:00
Daniel Berlin
08f8188adc
Fix small bug in operator== for iterators
...
llvm-svn: 42331
2007-09-26 00:11:59 +00:00
Hartmut Kaiser
fcecf23d48
Updated VC++ build system.
...
llvm-svn: 42330
2007-09-25 23:32:45 +00:00
Dale Johannesen
17663f40b9
Remove no-longer-used variable.
...
llvm-svn: 42329
2007-09-25 23:32:20 +00:00
Dale Johannesen
e7439eff5a
Make APFloat->int conversions deterministic even in
...
cases with undefined behavior.
llvm-svn: 42328
2007-09-25 23:07:07 +00:00
Ted Kremenek
a88f7bcea3
Updated XCode project to reflect that DataflowValues.h and DataflowSolver.h have
...
moved to include/clang/Analysis/FlowSensitive.
llvm-svn: 42327
2007-09-25 22:45:38 +00:00
Chris Lattner
ccc1b69a52
explain why not vector<bool>
...
llvm-svn: 42324
2007-09-25 22:37:50 +00:00
Evan Cheng
5321fa44f4
Missing load / store folding entries.
...
llvm-svn: 42323
2007-09-25 22:10:43 +00:00
Anton Korobeynikov
90910745bb
Partly revert invalid r41774
...
llvm-svn: 42322
2007-09-25 21:52:30 +00:00
Ted Kremenek
39fc60f280
Moved "DataflowSolver.h" to the "include/" subtree. Adjusted client
...
code that uses the solver to reflect the new location.
Created "FlowSensitive" subdirectory in include/clang/Analysis to hold
header files relating to flow-sensitive analyses. Moved
"DataflowValues.h" into this subdirectory.
llvm-svn: 42320
2007-09-25 21:00:24 +00:00
Fariborz Jahanian
e2017c1d1d
Patch to make ObjcImplementationDecl derived from TypeDecl and supprt legacy
...
objective-c code with no @interface declaration.
llvm-svn: 42319
2007-09-25 21:00:20 +00:00
Bill Wendling
982d57da39
Grammar fix.
...
llvm-svn: 42318
2007-09-25 20:45:10 +00:00
Ted Kremenek
9c3fe8d2e8
Fixed broken English in comment.
...
llvm-svn: 42317
2007-09-25 20:37:28 +00:00
Dan Gohman
57211c5550
More explicit keywords.
...
llvm-svn: 42316
2007-09-25 20:27:06 +00:00
Duncan Sands
384f4bd878
Add a newline to the end of this file.
...
llvm-svn: 42314
2007-09-25 20:08:48 +00:00
Dan Gohman
06919e8ef2
Fix a typo in a comment.
...
llvm-svn: 42313
2007-09-25 19:37:26 +00:00
Evan Cheng
8ee1ecfc50
New style x87 cmp instructions.
...
llvm-svn: 42312
2007-09-25 19:08:02 +00:00
Fariborz Jahanian
bfe13c566c
This patch introduces a new class to keep track of class implementation info. It also adds more
...
semantic checks for class and protocol declarations. Test cases are good indications of kind of
checking being done in this patch.
llvm-svn: 42311
2007-09-25 18:38:09 +00:00
Ted Kremenek
558be36672
Added "CheckASTConsumer", a function that generalizes
...
"CheckDiagnostics" (used for -parse-ast-check) to check the
diagnostics of any ASTConsumer.
Reimplemented CheckDiagnostics to use CheckASTConsumer instead.
Added driver option -warn-dead-stores-check, which checks the
diagnostics generated by the DeadStores checker. This is implemented
using CheckASTConsumer.111
llvm-svn: 42310
2007-09-25 18:37:20 +00:00
Devang Patel
7bba386f72
Handle multiple induction variables.
...
This fixes PR714.
llvm-svn: 42309
2007-09-25 18:24:48 +00:00
Dan Gohman
31599685c7
When both x/y and x%y are needed (x and y both scalar integer), compute
...
both results with a single div or idiv instruction. This uses new X86ISD
nodes for DIV and IDIV which are introduced during the legalize phase
so that the SelectionDAG's CSE can automatically eliminate redundant
computations.
llvm-svn: 42308
2007-09-25 18:23:27 +00:00
Ted Kremenek
2826f6e63f
Changed command line options "-check-dead-stores" and
...
"-check-uninit-values" to "-warn-dead-stores" and
"-warn-uninit-values"
llvm-svn: 42307
2007-09-25 18:05:45 +00:00
Devang Patel
440d13b55b
Do not reserve DOM check for GetElementPtrInst.
...
llvm-svn: 42306
2007-09-25 17:55:50 +00:00
Ted Kremenek
2af52eb454
Comment formatting changes. No real content changes.
...
llvm-svn: 42305
2007-09-25 17:53:38 +00:00
Ted Kremenek
67f6ea19d7
Minor comment changes.
...
llvm-svn: 42304
2007-09-25 17:51:05 +00:00
Dale Johannesen
97d4bf2c41
Some tests for APFloat conversions.
...
llvm-svn: 42303
2007-09-25 17:50:55 +00:00
Evan Cheng
6cb71f7fe0
Forgot to check in the changes. Fix test case so it doesn't break with any scheduling changes.
...
llvm-svn: 42302
2007-09-25 17:47:38 +00:00
Ted Kremenek
9716d61923
Removed "EverKilled" class in DeadStores checker; it is no longer used.
...
llvm-svn: 42301
2007-09-25 17:47:04 +00:00
Devang Patel
5e1651d270
doh..
...
llvm-svn: 42300
2007-09-25 17:43:08 +00:00
Devang Patel
87d7e8ebcb
Add transformation to update loop interation space. Now,
...
for (i=A; i<N; i++) {
if (i < X && i > Y)
do_something();
}
is transformed into
U=min(N,X); L=max(A,Y);
for (i=L;i<U;i++)
do_somethihg();
llvm-svn: 42299
2007-09-25 17:31:19 +00:00
Dale Johannesen
4f55d9fe0f
Fix long double<->shorter FP type conversions
...
of zero, infinity, and NaNs.
llvm-svn: 42298
2007-09-25 17:25:00 +00:00
Dan Gohman
5e1a428344
Move the setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand) and
...
the check to see if the assembler supports .loc from X86TargetLowering
into the superclass TargetLowering.
llvm-svn: 42297
2007-09-25 15:10:49 +00:00
Duncan Sands
4a229e908a
Fix spelling.
...
llvm-svn: 42296
2007-09-25 13:53:22 +00:00
Hartmut Kaiser
c173edd271
Updated VC++ build system
...
llvm-svn: 42295
2007-09-25 13:08:03 +00:00
Duncan Sands
734b861299
Add missing end-of-file newlines.
...
llvm-svn: 42294
2007-09-25 07:10:01 +00:00
Ted Kremenek
ad8bce02f0
Further refactored DataflowSolver. Now most code for the solver is shared
...
between forward and backward analyses, with trait classes being used
to implement the key differences in operations/functionality.
Converted the LiveVariables analysis to use the generic DataflowSolver. This,
along with removing some extra functionality that was not needed, reduced
the code for LiveVariables by over half.
Modified Driver code to handle the updated interface to LiveVariables.
Modified the DeadStores checker to handle the update interface to
LiveVariables.
Updated DataflowValues (generic ADT to store dataflow values) to also
store values for blocks. This is used by DeadStores. Updated some comments.
llvm-svn: 42293
2007-09-25 04:31:27 +00:00
Ted Kremenek
7e839f10cf
Added extra "constness" to parameter.
...
llvm-svn: 42292
2007-09-25 04:30:51 +00:00
Chris Lattner
70d1faa17d
use the right rounding mode.
...
llvm-svn: 42291
2007-09-25 04:29:44 +00:00
Ted Kremenek
ce5568f568
Added PersistentMap, an ADT that implements a map data structure that
...
is persistent. Adds/removals to a PersistentMap do not result in
a map being modified, but a new map being created. This will be useful
for path-sensitive analyses.
The current implementation mainly makes copies to implement this
functionality. If the map turns out to be extensively used, this
implementation will be replaced with a more efficient one that uses
data sharing (see comments in PersistentMap.h for more information).
llvm-svn: 42290
2007-09-25 04:26:20 +00:00
Owen Anderson
5d913aa357
Fill in the sections about my contributions.
...
llvm-svn: 42286
2007-09-25 02:10:58 +00:00
Evan Cheng
e95f391ef1
Added support for new condition code modeling scheme (i.e. physical register dependency). These are a bunch of instructions that are duplicated so the x86 backend can support both the old and new schemes at the same time. They will be deleted after
...
all the kinks are worked out.
llvm-svn: 42285
2007-09-25 01:57:46 +00:00
Evan Cheng
5924bf7d3b
Added major new capabilities to scheduler (only BURR for now) to support physical register dependency. The BURR scheduler can now backtrace and duplicate instructions in order to avoid "expensive / impossible to copy" values (e.g. status flag EFLAGS for x86) from being clobbered.
...
llvm-svn: 42284
2007-09-25 01:54:36 +00:00
Evan Cheng
8a7dec736d
New temporary option -new-cc-modeling-scheme to test the new cc modeling scheme.
...
llvm-svn: 42283
2007-09-25 01:50:04 +00:00
Evan Cheng
43686dad3d
Rename keyword "modify" -> "implicit".
...
llvm-svn: 42282
2007-09-25 01:48:59 +00:00
Dale Johannesen
0241bb57b2
When mixing SSE and x87 codegen, it's possible to
...
have situations where an SSE instruction turns into
multiple blocks, with the live range of an x87
register crossing them. To do this correctly make
sure we examine all blocks when inserting
FP_REG_KILL. PR 1697. (This was exposed by my
fix for PR 1681, but the same thing could happen
mixing x87 long double with SSE.)
llvm-svn: 42281
2007-09-24 22:52:39 +00:00
Bill Wendling
d40e795c19
Don't execute dump unless NDEBUG isn't defined.
...
llvm-svn: 42280
2007-09-24 22:43:48 +00:00
Daniel Berlin
c82c9f078a
Comment fixups
...
llvm-svn: 42279
2007-09-24 22:20:45 +00:00
Dan Gohman
1b2156fcae
Add support on x86 for having Legalize lower ISD::LOCATION to ISD::DEBUG_LOC
...
instead of ISD::LABEL with a manual .debug_line entry when the assembler
supports .file and .loc directives.
llvm-svn: 42278
2007-09-24 21:54:14 +00:00
Dan Gohman
3165699e4b
Don't emit .debug_line header data if there aren't any lines to put in it,
...
such as will happen when .loc directives are used.
llvm-svn: 42277
2007-09-24 21:43:52 +00:00
Dan Gohman
9b00c07be5
Move the Asm->EOL() call for EmitDebugARanges outside the #ifdef for
...
consistency with the other currently empty sections.
llvm-svn: 42276
2007-09-24 21:36:21 +00:00
Dan Gohman
0baf84b2e1
Add support for emitting .file directives to set up file numbers for
...
use with .loc directives.
llvm-svn: 42275
2007-09-24 21:32:18 +00:00
Dan Gohman
0cc9d1b93b
Merge hasDotLoc and hasDotFile into hasDotLocAndDotFile since .loc and .file
...
aren't really usable without each other.
llvm-svn: 42274
2007-09-24 21:09:53 +00:00
Dale Johannesen
5026f4ba93
float->int conversion rounds toward 0. Duh.
...
Fixes PR1698.
llvm-svn: 42273
2007-09-24 21:06:09 +00:00
Dan Gohman
bd8331da87
Add a routine for emitting .file directives, for setting up
...
file numbers to use with .loc directives.
llvm-svn: 42272
2007-09-24 20:58:13 +00:00
Bruno Cardoso Lopes
6d5ada23db
Added "LoadEffective" pattern to handle stack locations.
...
Fixed some comments
llvm-svn: 42271
2007-09-24 20:15:11 +00:00
Devang Patel
9e30e1a3be
Do not promote null values because it may be unsafe to do so.
...
llvm-svn: 42270
2007-09-24 20:02:42 +00:00
Daniel Berlin
5d7136a1df
Implement offline variable substitution in order to reduce memory
...
and time usage.
Fixup operator == to make this work, and add a resize method to DenseMap
so we can resize our hashtable once we know how big it should be.
llvm-svn: 42269
2007-09-24 19:45:49 +00:00
Dan Gohman
071efe28bb
Fix the syntax for the .loc directive in preparation for using it.
...
llvm-svn: 42268
2007-09-24 19:25:06 +00:00
Daniel Berlin
d746bbd908
Add section on bit containers.
...
(Not the most well written stuff in the universe :P)
llvm-svn: 42267
2007-09-24 17:52:25 +00:00
Tanya Lattner
583e27d755
XFAIL for llvm-gcc4.0
...
llvm-svn: 42266
2007-09-24 17:14:53 +00:00
Dan Gohman
82dcfd2dab
The code that used the StartLabelId label was removed, so remove the
...
code that creates the label too.
llvm-svn: 42265
2007-09-24 16:44:26 +00:00
Dan Gohman
6002818999
Use the correct result value type instead of using getValueType(0)
...
in ExpandEXTRACT_VECTOR_ELT and SplitVectorOp. This fixes an abort
in the included testcase.
llvm-svn: 42264
2007-09-24 15:54:53 +00:00
Dan Gohman
f818ccd463
Fix a typo in a comment.
...
llvm-svn: 42263
2007-09-24 15:50:11 +00:00
Dan Gohman
75470c3bf1
explicit keywords.
...
llvm-svn: 42262
2007-09-24 15:48:49 +00:00
Dan Gohman
043689cf7d
Remove an unnecessary static_cast.
...
llvm-svn: 42261
2007-09-24 15:46:02 +00:00
Ted Kremenek
962942f7a4
Added smart pointer class "IntrusiveSPtr" that handles reference
...
counted objects that maintain their own internal reference count.
This smart pointer implementation is compatible with LLVM-style
down-casting (see in llvm: include/llvm/Support/Casting.h).
Implemented "RefCounted", a base class that objects that wish to be
managed using IntrusiveSPtrs can subclass.
Reference counted objects are being targeted for use in path-sensitive
dataflow analyses where managing many live objects becomes difficult.
llvm-svn: 42260
2007-09-24 06:10:20 +00:00
Chris Lattner
5b5484db63
claim that "st" is from the 80-bit register file. This causes x87-using inline
...
asm to die with:
ScheduleDAG.cpp:269: failed assertion `false && "Couldn't find the register class"'
instead of:
failed assertion `RegMap->getRegClass(VReg) == RC && "Register class of operand and regclass of use don't agree!"'
yay.
llvm-svn: 42259
2007-09-24 05:27:37 +00:00
Chris Lattner
d05e44e74e
If we see an invalid #ifdef directive, enter a conditional compilation region
...
so that we don't emit an error on the #endif. Suggestion by Neil.
llvm-svn: 42258
2007-09-24 05:14:57 +00:00
Chris Lattner
7d98b23f1a
When emitting .set directives, make sure the EH and Debug labels can't conflict.
...
llvm-svn: 42257
2007-09-24 03:35:37 +00:00
Owen Anderson
32eed1542e
Fix typo.
...
llvm-svn: 42256
2007-09-24 02:33:22 +00:00
Owen Anderson
4f7c390939
Merge significant portions of the DomTree and PostDomTree implementations.
...
The two remaining unmerged parts are DFSPass, and the Calculate().
llvm-svn: 42255
2007-09-24 02:29:29 +00:00
Dale Johannesen
acbb26f125
Just use APFloat for const / const. Fixes
...
-1. / -0.
llvm-svn: 42254
2007-09-24 00:32:45 +00:00
Chris Lattner
071107120c
Fix for 64-bit systems.
...
llvm-svn: 42253
2007-09-23 23:53:07 +00:00
Hartmut Kaiser
e675ff918b
Fixed VC++ bitfield to unsigned/signed sign propagation issue.
...
llvm-svn: 42252
2007-09-23 23:39:51 +00:00
Owen Anderson
15efb43db7
Factor the calculation details for PostDomTree out of PostDominators.cpp and
...
into a separate header file.
Next step: merging PostDominatorCalculation.h with DominatorCalculation.h.
llvm-svn: 42251
2007-09-23 22:21:00 +00:00
Owen Anderson
da853a400f
Move DFSPass back down into DominatorTree. I need to figure out what the difference is between it
...
and the PostDomTree version first.
llvm-svn: 42250
2007-09-23 22:16:38 +00:00
Owen Anderson
7888658c5f
Fix header.
...
llvm-svn: 42249
2007-09-23 21:32:55 +00:00
Owen Anderson
84c357fc26
Factor the dominator tree calculation details out into DominatorCalculation.h. This
...
change is not useful in and of itself, but it lays the groundwork for combining
the dominator and postdominator implementations.
Also, factor a few methods that are common to DominatorTree and PostDominatorTree
into DominatorTreeBase. Again, this will make merging the two calculation methods
simpler in the future.
llvm-svn: 42248
2007-09-23 21:31:44 +00:00
Dale Johannesen
ae4bb05103
Implementation of +sse -sse2 has changed; add
...
-sse to preserve intent of this test.
llvm-svn: 42247
2007-09-23 14:58:14 +00:00
Dale Johannesen
e36c400255
Fix PR 1681. When X86 target uses +sse -sse2,
...
keep f32 in SSE registers and f64 in x87. This
is effectively a new codegen mode.
Change addLegalFPImmediate to permit float and
double variants to do different things.
Adjust callers.
llvm-svn: 42246
2007-09-23 14:52:20 +00:00
Gordon Henriksen
9af2d596ed
Fix srcdir <> objdir builds with ocaml 2.10. Downrev versions don't care whether
...
'dir' exists in 'ocamldep -I dir ...', but recent ones demand that it actually
exists.
llvm-svn: 42245
2007-09-23 13:37:44 +00:00
Chris Lattner
0af0591143
fix syntax
...
llvm-svn: 42242
2007-09-22 23:41:15 +00:00
Gordon Henriksen
6ab5c57663
Regenerate.
...
llvm-svn: 42241
2007-09-22 21:36:59 +00:00
Gordon Henriksen
54fd757f4f
Fix for srcdir <> objdir builds.
...
Thanks Bill.
llvm-svn: 42240
2007-09-22 21:36:22 +00:00
Chris Lattner
e48195e0f3
Fix PR1679, by printing GEP indices as signed values instead of unsigned.
...
llvm-svn: 42239
2007-09-22 20:16:48 +00:00
Chris Lattner
322abe3573
Use the APFloat routines to evaluate FP immediates as
...
integer constant expressions. The only questionable
thing is that we now reject:
void foo() {
switch (1) {
case (int)1.0e10000:
;
}
}
with:
t.c:5:13: error: case label does not reduce to an integer constant
case (int)1.0e10000:
~~~~~^~~~~~~~~
GCC accepts this, emitting the pedwarn:
t.c:5: warning: floating constant exceeds range of 'double'
llvm-svn: 42238
2007-09-22 19:04:13 +00:00
Chris Lattner
9da7bc110a
add comments.
...
llvm-svn: 42237
2007-09-22 18:48:32 +00:00
Chris Lattner
2dd003e807
further apfloat'ize the front-end, allowing codegen to pass
...
APFloat straight through to LLVM now.
llvm-svn: 42236
2007-09-22 18:47:25 +00:00
Chris Lattner
c2d09cfe75
work around bugs and missing features in apfloat.
...
llvm-svn: 42235
2007-09-22 18:38:30 +00:00
Chris Lattner
ec0a6d9be5
Use APFloat for the representation of FP immediates, ask the target
...
for *which* apfloat to use for a particular type.
llvm-svn: 42234
2007-09-22 18:29:59 +00:00
Bill Wendling
20e469e99b
Validation fixes
...
llvm-svn: 42232
2007-09-22 10:17:08 +00:00
Bill Wendling
99dbd04c5d
Validation fixes
...
llvm-svn: 42231
2007-09-22 10:13:39 +00:00
Bill Wendling
31e1e5e37a
Validation fixes
...
llvm-svn: 42230
2007-09-22 10:07:00 +00:00
Bill Wendling
bdd6bd8236
Validation fixes
...
llvm-svn: 42229
2007-09-22 10:03:25 +00:00
Bill Wendling
370dac7346
Validation fixes
...
llvm-svn: 42228
2007-09-22 09:56:28 +00:00
Bill Wendling
beee622c4d
Validation fixes
...
llvm-svn: 42227
2007-09-22 09:54:47 +00:00
Bill Wendling
8715e0c490
Validation fixes
...
llvm-svn: 42226
2007-09-22 09:39:19 +00:00
Bill Wendling
252570f0ad
Validation fixes
...
llvm-svn: 42225
2007-09-22 09:23:55 +00:00
Bill Wendling
6637c57c54
Validation fixes
...
llvm-svn: 42224
2007-09-22 09:20:07 +00:00
Bill Wendling
6275c23755
Formatting changes.
...
llvm-svn: 42223
2007-09-22 09:16:44 +00:00
Chris Lattner
10671ad650
initialize isstore/isload fields in ctor, fixing PR1695
...
llvm-svn: 42222
2007-09-22 07:02:12 +00:00
Chris Lattner
5b95a171e2
fix bugs in the manual
...
llvm-svn: 42221
2007-09-22 03:17:52 +00:00
Neil Booth
a8d7269269
Handle storage complications of float->float conversions.
...
llvm-svn: 42220
2007-09-22 02:56:19 +00:00
Tanya Lattner
cf3e26fff2
Correct names.
...
llvm-svn: 42219
2007-09-22 00:03:01 +00:00
Fariborz Jahanian
7e5d533098
This patch adds to new things to clang:
...
1. Handles saving and checking on protocols used in an @interface declaration
2. Checks and saves class's super class.
3. Adds semantic check to category declarations.
llvm-svn: 42218
2007-09-22 00:01:35 +00:00
Tanya Lattner
08abc81a44
Fix typo.
...
llvm-svn: 42217
2007-09-22 00:01:26 +00:00
Tanya Lattner
0186a65ac7
One last fix to get name correct.
...
llvm-svn: 42216
2007-09-21 23:57:59 +00:00
Tanya Lattner
afcdaf58d4
Fix silly typo.
...
llvm-svn: 42215
2007-09-21 23:57:04 +00:00
Tanya Lattner
23dbd57214
Update annotation intrinsic with more details.
...
llvm-svn: 42214
2007-09-21 23:56:27 +00:00
Tanya Lattner
293c037336
Adding support for __builtin_annotation with an intrinsic called llvm.annotation. This is similar to llvm.var.annotation but is applied to expressions.
...
llvm-svn: 42211
2007-09-21 22:59:12 +00:00
Dale Johannesen
4230512f32
Change APFloat::convertFromInteger to take the incoming
...
bit width instead of number of words allocated, which
makes it actually work for int->APF conversions.
Adjust callers. Add const to one of the APInt constructors
to prevent surprising match when called with const
argument.
llvm-svn: 42210
2007-09-21 22:09:37 +00:00
Devang Patel
361e52f39c
Fix PR1692
...
llvm-svn: 42209
2007-09-21 21:18:19 +00:00
Owen Anderson
3e466535cf
Fix CopyFrom for non-POD data types.
...
llvm-svn: 42208
2007-09-21 20:55:54 +00:00
Chris Lattner
87ce0bec91
#ifdef out unsafe tracing code, which fixes PR1689
...
llvm-svn: 42205
2007-09-21 18:30:39 +00:00
Chris Lattner
51ce795c92
don't read Block after it is freed. This fixes PR1684
...
llvm-svn: 42204
2007-09-21 18:25:53 +00:00
Chris Lattner
4b2ff02f72
Make case sorting deterministic by not depending on pointer
...
values. Patch mostly by Gabor Greif for PR1682.
llvm-svn: 42203
2007-09-21 18:15:22 +00:00
Devang Patel
d331c8565f
Add missing entry.
...
llvm-svn: 42202
2007-09-21 18:02:24 +00:00
Chris Lattner
af6912f980
gcroot testcase, patch by Eric Christopher.
...
llvm-svn: 42198
2007-09-21 17:48:39 +00:00
Chris Lattner
1af762f736
I cannot spell coalesce :)
...
llvm-svn: 42196
2007-09-21 17:43:52 +00:00
Chris Lattner
12477735f9
gcroot must take concrete types, not arbitrary types.
...
clean up intrinsic descriptions in langref a bit.
llvm-svn: 42194
2007-09-21 17:30:40 +00:00
Chris Lattner
b3d01d2f56
initialize SetCCResultContents, fixing PR1693
...
llvm-svn: 42193
2007-09-21 17:06:39 +00:00
Rafael Espindola
4730c04904
Don't add a default STACK_ALIGN (use the generic ABI alignment)
...
Implement calls to functions with byval arguments on X86
llvm-svn: 42192
2007-09-21 15:50:22 +00:00
Fariborz Jahanian
876e27dafa
This patch instantiates objects for forward protocols and in general handles use of
...
protocols referenced in @protocol declarations.
llvm-svn: 42191
2007-09-21 15:40:54 +00:00
Dan Gohman
3bb3452dbc
There is no {rsqrt,rcp}{p,s}d.
...
llvm-svn: 42190
2007-09-21 15:24:00 +00:00
Rafael Espindola
f065f0e2a1
small cleanup: use LowerMemArgument in LowerFastCCArguments also
...
llvm-svn: 42189
2007-09-21 14:55:38 +00:00
Chris Lattner
0a1fd10483
Initial hack at 2.1 release notes.
...
llvm-svn: 42186
2007-09-21 03:54:09 +00:00
Owen Anderson
46da2a6262
Add partial caching of non-local memory dependence queries. This provides a modest
...
speedup for GVN.
llvm-svn: 42185
2007-09-21 03:53:52 +00:00
Evan Cheng
1ff71872c2
Honor user-defined section specification of a global, ignores whether its initializer is null.
...
llvm-svn: 42182
2007-09-21 00:41:19 +00:00
Dale Johannesen
146a0ea071
Fix PR 1688. See comments there.
...
llvm-svn: 42181
2007-09-20 23:47:58 +00:00
Devang Patel
83cc3f8f51
Update aux. info associated with an instruction before erasing instruction.
...
llvm-svn: 42180
2007-09-20 23:45:50 +00:00
Devang Patel
d29f938335
Do not override user specified section.
...
llvm-svn: 42179
2007-09-20 23:07:37 +00:00
Devang Patel
6117a3b696
Don't increment invalid iterator.
...
llvm-svn: 42178
2007-09-20 23:01:50 +00:00
Hartmut Kaiser
3f5d492c70
Updated VC++ project files
...
llvm-svn: 42177
2007-09-20 21:54:10 +00:00
Ted Kremenek
8483a4ab05
Updated XCode project with locations of "Analysis" visitor header files.
...
llvm-svn: 42176
2007-09-20 21:47:32 +00:00
Ted Kremenek
24c624477e
Updated header file inlcude to new location of
...
Analysis/Visitors/*Visitors.h files.
llvm-svn: 42175
2007-09-20 21:42:55 +00:00
Ted Kremenek
3b2050b322
Renamed "include/clang/Analysis/CFGVisitors" "<snip>/Analysis/Visitors".
...
"Visitors" is more general than "CFGVisitors", as we aren't just using
visitation useful for CFG analysis.
llvm-svn: 42174
2007-09-20 21:42:03 +00:00
Ted Kremenek
706df48fea
Moved include/clang/Analysis/*Visitor.h to include/clang/Analysis/CFGVisitors.
...
We had enough visitors that it was cluttering the Analysis directory.
llvm-svn: 42173
2007-09-20 21:40:36 +00:00
Fariborz Jahanian
397d8de9ed
Handle forward declaration of classes and prevent re-instantiation of
...
ObjcInterfaceClass Objects.
llvm-svn: 42172
2007-09-20 20:26:44 +00:00
Duncan Sands
416b9f0410
Testcase for PR1678.
...
llvm-svn: 42171
2007-09-20 18:56:24 +00:00
Evan Cheng
723dab1005
Disable if-conversion for this test.
...
llvm-svn: 42170
2007-09-20 18:06:22 +00:00
Evan Cheng
77d4771405
-enable-arm-if-conversion is gone.
...
llvm-svn: 42169
2007-09-20 18:03:23 +00:00
Fariborz Jahanian
a8bbc63c1f
Match to do some semantic analysis on objective-c class decl.
...
1. Detect used of undeclared/forward declared super class.
2. Detect duplicate definition of a class.
llvm-svn: 42168
2007-09-20 17:54:07 +00:00
Dale Johannesen
cc7c475705
Fix dumb regression in constant folding (Regression/C/casts)
...
llvm-svn: 42165
2007-09-20 16:50:21 +00:00
Gordon Henriksen
d1e1645a4e
Regenerate.
...
llvm-svn: 42164
2007-09-20 16:48:18 +00:00
Gordon Henriksen
1f982339e7
Incorporating review feedback for GC verifier patch.
...
llvm-svn: 42163
2007-09-20 16:47:41 +00:00
Dan Gohman
4dbc582a36
Fix several more entries in the x86 reload/remat folding tables.
...
llvm-svn: 42162
2007-09-20 14:17:21 +00:00
Hartmut Kaiser
8a43d50f40
Updated VC++ project files.
...
Disambiguated a variable.
llvm-svn: 42161
2007-09-20 13:35:09 +00:00
Gabor Greif
4a46052d30
use typenames equivalent to
...
(u)intval, because latter are not
present in older caml/mlvalues.h
(e.g. 2004/07/07, 1.48.6.1)
Using this as a workaround for now,
until --without-ocaml works
or we settle on a better solution
llvm-svn: 42160
2007-09-20 10:20:34 +00:00
Dale Johannesen
95be037d67
another long double buglet
...
llvm-svn: 42159
2007-09-20 01:27:54 +00:00
Nick Lewycky
e7be16a053
Excuse me.
...
llvm-svn: 42158
2007-09-20 00:57:00 +00:00
Nick Lewycky
eae7e7d00b
Fix optimization. %x = sub %x, %y does not imply that %y is zero.
...
llvm-svn: 42157
2007-09-20 00:48:36 +00:00
Evan Cheng
8010320365
Enable if-conversion for ARM by default.
...
llvm-svn: 42156
2007-09-20 00:48:22 +00:00
Dale Johannesen
7d67e547b5
More long double fixes. x86_64 should build now.
...
llvm-svn: 42155
2007-09-19 23:55:34 +00:00
Evan Cheng
d0e360e16e
Avoid referencing deleted instruction.
...
llvm-svn: 42153
2007-09-19 21:48:07 +00:00
Ted Kremenek
66d130a584
Added support to clang driver to view ASTs using GraphViz. This
...
functionality is still preliminary.
llvm-svn: 42152
2007-09-19 21:29:43 +00:00
Ted Kremenek
ebc5500e50
Previously GraphWriter assumed operator*() for node_iterator always
...
returned a reference type. This patch allows operator*() to return a
non-reference type while still maintaining the old behavior when it
does return a reference type.
This patch was motivated when I tried to use "df_iterator" (see
llvm/ADT/DepthFirstIterator.h) as a "node_iterator", as df_iterator
does not return a reference type and thus we would get a compilation
error when trying to take the address of a temporary.
llvm-svn: 42151
2007-09-19 21:26:49 +00:00
Ted Kremenek
a8f4ef5846
Moved GraphTraits<Stmt*> to StmtGraphTraits.h. This allows consumers of Stmt.h not to have to pay the cost
...
of parsing the GraphTraits templates if they don't need that functionality.
Defined nodes_iterator for GraphTraits<Stmt*> to be based on llvm::df_iterator.
llvm-svn: 42150
2007-09-19 21:21:39 +00:00
Devang Patel
464276f831
Avoid unsafe promotion.
...
llvm-svn: 42149
2007-09-19 20:18:51 +00:00
Fariborz Jahanian
62fd2b4730
Patch to parse objective-c's @try-statement and @throw-statement.
...
llvm-svn: 42148
2007-09-19 19:14:32 +00:00
Evan Cheng
513874cf3c
PSHUFDmi, etc. are actually folding a load, not a store.
...
llvm-svn: 42147
2007-09-19 19:02:47 +00:00
Ted Kremenek
a3d706a778
Added GraphTraits template specialization for Stmt* to treat ASTs like graphs.
...
llvm-svn: 42146
2007-09-19 18:18:40 +00:00
Ted Kremenek
ec55ce39a6
More refactoring: decl and expr regisitration now uses CFGRecStmtDeclVisitor.
...
llvm-svn: 42145
2007-09-19 18:00:03 +00:00
Ted Kremenek
5885a5b417
Added two new visitors that extend CFGStmtVisitor: CFGRecStmtVisitor and CFGRecStmtDeclVisitor.
...
The extended functionality of these visitors is that they automatically visit all statements in
an AST (no explicit recursion is required from subclasses), and the for the latter, decls are visited
as well.
llvm-svn: 42144
2007-09-19 17:59:28 +00:00
Dale Johannesen
b59d25fe54
Fix longdouble -> uint conversion.
...
llvm-svn: 42143
2007-09-19 17:53:26 +00:00
Chris Lattner
d79f3d51b1
reject things like "declare internal @foo"
...
llvm-svn: 42140
2007-09-19 17:14:45 +00:00
Steve Naroff
2cd263ff71
Remove SelectorTable/SelectorInfo, simply store all selectors in the central IdentifierTable.
...
Rationale:
We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually).
It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data:
Two tables:
*** Selector/Identifier Stats:
# Selectors/Identifiers: 51635
Bytes allocated: 1999824
One table:
*** Identifier Table Stats:
# Identifiers: 49500
Bytes allocated: 1990316
llvm-svn: 42139
2007-09-19 16:18:46 +00:00
Owen Anderson
c201cbc802
Add a flag to mark a dirty cache entry. This is not yet used, but will eventually
...
help non-local memdep caching.
llvm-svn: 42137
2007-09-19 16:13:57 +00:00
Dale Johannesen
f4bad97ea0
Fix some long double issues.
...
llvm-svn: 42133
2007-09-19 14:22:58 +00:00
Duncan Sands
d31649bc59
Improve comment.
...
llvm-svn: 42132
2007-09-19 10:25:38 +00:00
Duncan Sands
a38e527523
Partial fix for PR1678: correct some parts of constant
...
fold that were missed in the fix for PR1646. Probably
this null/not-null logic should be factorized somewhere.
llvm-svn: 42131
2007-09-19 10:16:17 +00:00
Duncan Sands
56df7dec2b
A global variable with external weak linkage can be null, while
...
an alias could alias such a global variable.
llvm-svn: 42130
2007-09-19 10:10:31 +00:00
Gabor Greif
ef858c9ff6
include alloca.h if available. this helps Solaris, but intnat and uintnat types are still undefined, causing errors
...
llvm-svn: 42129
2007-09-19 09:29:58 +00:00
Duncan Sands
4e426623f5
Testcase for PR1678.
...
llvm-svn: 42128
2007-09-19 07:43:17 +00:00
Steve Naroff
59155be0b2
Remove #include of config.h, it is no longer needed.
...
llvm-svn: 42126
2007-09-19 03:01:22 +00:00
Evan Cheng
0effc3a6b8
Use struct SDep instead of std::pair for SUnit pred and succ lists. First step
...
in tracking physical register output dependencies.
llvm-svn: 42125
2007-09-19 01:38:40 +00:00
Evan Cheng
17f589f76e
Set CCR (EFLAGS) copy cost to -1, i.e. extremely expensive to copy.
...
llvm-svn: 42124
2007-09-19 01:36:39 +00:00
Evan Cheng
f73fb6261b
Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
...
between two registers in the specific class.
llvm-svn: 42123
2007-09-19 01:35:01 +00:00
Devang Patel
69a55a38ed
Relax loop ExitCondition predicate restriction.
...
llvm-svn: 42122
2007-09-19 00:28:47 +00:00
Devang Patel
455a53b7db
Filter loops where split condition's false branch is not empty. For example
...
for (int i = 0; i < N; ++i) {
if (i == somevalue)
dosomething();
else
dosomethingelse();
}
llvm-svn: 42121
2007-09-19 00:15:16 +00:00
Devang Patel
4c238c451f
Bail out early, before modifying anything.
...
llvm-svn: 42120
2007-09-19 00:11:01 +00:00
Devang Patel
31f2c8592c
Work is incomplete. Loop is not modified at all right now.
...
llvm-svn: 42119
2007-09-19 00:08:13 +00:00
Devang Patel
ee35011d01
ooops...
...
llvm-svn: 42118
2007-09-18 23:58:14 +00:00
Steve Naroff
467e619a65
Remove alloca import...
...
llvm-svn: 42117
2007-09-18 23:56:42 +00:00
Steve Naroff
d54978ba8b
Progress on message expressions...
...
- Add ObjcMessageExpr AST node and associated constructors.
- Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API.
- Instantiate message expressions...
- Replace alloca usage with SmallString.
Next step, installing a correct type, among other tweaks...
llvm-svn: 42116
2007-09-18 23:55:05 +00:00
Ted Kremenek
fb9ea52a13
DataflowSolver now acccepts an "_Equal" template parameter that allows the user
...
to specify how two dataflow values should be compared for equality. The default
is to use std::equal_to.
llvm-svn: 42115
2007-09-18 23:40:51 +00:00
Ted Kremenek
d51126b97e
Fixed bug where getBitRef would incorrectly grab the bit from the
...
wrong bitvector.
llvm-svn: 42114
2007-09-18 23:30:45 +00:00
Ted Kremenek
9427b0e23b
Changed solver to use "==" operator when comparing dataflow values
...
rather than a special "equal" method defined in the class for the
value.
llvm-svn: 42113
2007-09-18 23:30:21 +00:00
Evan Cheng
e7ff9da64b
Clean up.
...
llvm-svn: 42112
2007-09-18 22:56:31 +00:00
Evan Cheng
e2e8f2d96b
Fix a bogus splat xform:
...
shuffle <undef, undef, x, undef>, <undef, undef, undef, undef>, <2, 2, 2, 2>
!=
<undef, undef, x, undef>
llvm-svn: 42111
2007-09-18 21:54:37 +00:00
Ted Kremenek
8d4dcc5409
Minor performance fix in transfer function logic. Previously we
...
called VisitStmt, but VisitChildren is more direct and creates less
boilerplate logic.
llvm-svn: 42110
2007-09-18 21:47:41 +00:00
Ted Kremenek
271161078b
More refactoring and code reduction.
...
llvm-svn: 42109
2007-09-18 21:43:18 +00:00
Gabor Greif
49122edc98
rename test, it is obviously misspelled
...
llvm-svn: 42108
2007-09-18 21:42:39 +00:00
Ted Kremenek
b1361eaaa7
Add overloaded versions of DataflowSolver::runOnBlock to simplify
...
invocation of the solver.
UninitializedValues checker now uses CFG::runOnAllBlocks to query the
computed dataflow values (tighter code).
llvm-svn: 42107
2007-09-18 21:08:21 +00:00
Ted Kremenek
360c3b4abb
Added member template CFG::VisitBlockStmts to provide a succinct way
...
of visiting all block-level statements in a CFG.
Tightened implementation of UninitializedValues.
llvm-svn: 42106
2007-09-18 20:59:00 +00:00
Ted Kremenek
2bde624474
Additional comments and cosmetic cleanups.
...
llvm-svn: 42105
2007-09-18 20:44:03 +00:00
Fariborz Jahanian
867a7eb5cb
Patch for object creation and handling of category declarations.
...
llvm-svn: 42104
2007-09-18 20:26:58 +00:00
Dale Johannesen
af12b57405
Prevent crash on long double.
...
llvm-svn: 42103
2007-09-18 18:36:59 +00:00
Ted Kremenek
df9a2a9f8b
Moved TransferFunction object within DataflowSolver to be a instance
...
variable instead of a temporary.
llvm-svn: 42102
2007-09-18 18:17:19 +00:00
Gordon Henriksen
dc88c06732
Tests of the ocaml (and thus C) bindings for constants.
...
llvm-svn: 42101
2007-09-18 18:07:51 +00:00
Ted Kremenek
584e21a349
Modified DataFlowValues and DataflowSolver to associate dataflow value
...
with CFG *edges* instead of blocks. This will fascilitate dataflow
analyses that are sensitive to block terminators, and also simplifies
some reasoning.
Updated UninitializedValues to comply to this new interface.
llvm-svn: 42099
2007-09-18 18:02:44 +00:00
Ted Kremenek
1d77d76837
Added type "CFG::Edge" to encapsulate the notion of directed-edges
...
within source-level CFGs.
llvm-svn: 42098
2007-09-18 18:01:15 +00:00
Dan Gohman
8cca8469de
Move the entries for 64-bit CMP, IMUL, and a few others into the correct
...
tables so that they are eligible for reload/remat folding. And add
entries for JMP and CALL.
llvm-svn: 42094
2007-09-18 14:59:14 +00:00
Gordon Henriksen
37582f74cd
Adding ocaml language bindings for the vmcore and bitwriter libraries. These are
...
built atop the C language bindings, and user programs can link with them as
such:
# Bytecode
ocamlc -cc g++ llvm.cma llvmbitwriter.cma -o example example.ml
# Native
ocamlopt -cc g++ llvm.cmxa llvmbitwriter.cmxa -o example.opt example.ml
The vmcore.ml test exercises most/all of the APIs thus far bound. Unfortunately,
they're not yet numerous enough to write hello world. But:
$ cat example.ml
(* example.ml *)
open Llvm
open Llvm_bitwriter
let _ =
let filename = Sys.argv.(1) in
let m = create_module filename in
let v = make_int_constant i32_type 42 false in
let g = define_global "hello_world" v m in
if not (write_bitcode_file m filename) then exit 1;
dispose_module m;
$ ocamlc -cc g++ llvm.cma llvm_bitwriter.cma -o example example.ml
File "example.ml", line 11, characters 6-7:
Warning Y: unused variable g.
$ ./example example.bc
$ llvm-dis < example.bc
; ModuleID = '<stdin>'
@hello_world = global i32 42 ; <i32*> [#uses=0]
The ocaml test cases provide effective tests for the C interfaces.
llvm-svn: 42093
2007-09-18 12:49:39 +00:00
Gordon Henriksen
4c7ca7d61e
Regenerate.
...
llvm-svn: 42092
2007-09-18 12:27:13 +00:00
Gordon Henriksen
c0f56013e1
(no commit message)
...
llvm-svn: 42091
2007-09-18 12:26:59 +00:00
Gordon Henriksen
5c4d7b8052
(no commit message)
...
llvm-svn: 42090
2007-09-18 12:26:17 +00:00
Hartmut Kaiser
ae27fdc0f4
alloca.h doesn't exist on Windows.
...
llvm-svn: 42089
2007-09-18 12:16:59 +00:00
Gabor Greif
56c83140c1
alloca.h is needed on Solaris
...
llvm-svn: 42088
2007-09-18 11:01:25 +00:00
Gordon Henriksen
be6bd16418
Incorporating review feedback for GC verifier patch.
...
llvm-svn: 42087
2007-09-18 10:14:30 +00:00
Bill Wendling
e8c885f261
Don't pass back a reference to a temporary.
...
llvm-svn: 42086
2007-09-18 09:10:16 +00:00
Bill Wendling
a83fd8014d
Update my entry.
...
llvm-svn: 42079
2007-09-18 05:28:19 +00:00
Bill Wendling
69833b61ac
The exception handling function info should be reset for each new
...
function. The information isn't used heavily -- it's only used at the end
of exception handling emission -- so there's no need to cache it.
llvm-svn: 42078
2007-09-18 05:03:44 +00:00
Gordon Henriksen
76a0374b25
C bindings for libLLVMCore.a and libLLVMBitWriter.a.
...
- The naming prefix is LLVM.
- All types are represented using opaque references.
- Functions are not named LLVM{Type}{Method}; the names became
unreadable goop. Instead, they are named LLVM{ImperativeSentence}.
- Where an attribute only appears once in the class hierarchy (e.g.,
linkage only applies to values; parameter types only apply to
function types), the class is omitted from identifiers for
brevity. Tastes like methods.
- Strings are C strings or string/length tuples on a case-by-case
basis.
- APIs which give the caller ownership of an object are not mapped
(removeFromParent, certain constructor overloads). This keeps
keep memory management as simple as possible.
For each library with bindings:
llvm-c/<LIB>.h - Declares the bindings.
lib/<LIB>/<LIB>.cpp - Implements the bindings.
So just link with the library of your choice and use the C header
instead of the C++ one.
llvm-svn: 42077
2007-09-18 03:18:57 +00:00
Gordon Henriksen
64e72c034a
Fixing an comment in Module.h that refers to a nonexistent parameter.
...
Also adding some missing svn:ignores that've been bothering me.
llvm-svn: 42076
2007-09-18 02:09:34 +00:00
Devang Patel
fcda998ab2
Fix PR1657
...
llvm-svn: 42075
2007-09-18 01:54:42 +00:00
Bill Wendling
067f1d8e95
Objective-C was generating EH frame info like this:
...
"_-[NSString(local) isNullOrNil]".eh = 0
.no_dead_strip "_-[NSString(local) isNullOrNil]".eh
The ".eh" should be inside the quotes.
llvm-svn: 42074
2007-09-18 01:47:22 +00:00
Fariborz Jahanian
0c74e9d161
Uses more description name for method implementation kind argument.
...
Moves such argument as the last argument and uses defaul value.
llvm-svn: 42073
2007-09-18 00:25:23 +00:00
Hartmut Kaiser
a9deb50918
Updated VC++ project files after file rename.
...
llvm-svn: 42072
2007-09-17 23:33:12 +00:00
Bill Wendling
5752f692ed
Add support for appending a suffix to the end of a mangled name.
...
llvm-svn: 42071
2007-09-17 22:39:32 +00:00
Fariborz Jahanian
cfacdae9a8
Patch to remove ObjcProtoMethodDecl and use ObjcMethodDecl
...
instead for @protocol method decls.
llvm-svn: 42070
2007-09-17 22:36:42 +00:00
Evan Cheng
ffd6995cc7
Bug fix and minor clean up of generated code.
...
llvm-svn: 42069
2007-09-17 22:26:41 +00:00
Devang Patel
00064e1bab
Do not hide APInt::dump() inside #ifndef NDEBUG.
...
llvm-svn: 42068
2007-09-17 22:24:00 +00:00
Ted Kremenek
3c996d9a60
Bug fix to merging of data flow values (merge incorrectly made values
...
too "conservative").
Several revisions to UninitializedValues checker after testing. We
now appear to be working correctly (probably some bugs still, but main
functionality appears to be there). Implemented careful emitting of
warnings so that we wouldn't get a cascade of warnings for simply not
defining a single variable and using it everywhere. This way the
warnings point closer to the root cause rather than "symptoms" from
using values derived from uninitialized variables.
llvm-svn: 42067
2007-09-17 21:59:08 +00:00
Tanya Lattner
613ccacb49
Fix broken default help strings for enable-shared, enable-static, and enable-fast-install. Regenerate configure script.
...
llvm-svn: 42066
2007-09-17 21:41:15 +00:00
Steve Naroff
c4657d00bb
Add a comment and remove unused constructors.
...
llvm-svn: 42063
2007-09-17 21:26:50 +00:00
Ted Kremenek
fb5c46c740
Made driver flag --check-uninit-values more self-explanatory.
...
llvm-svn: 42062
2007-09-17 21:21:20 +00:00
Hartmut Kaiser
f696cfcf06
Fixed a VC++ issue related to bitmasks. As it turns out the compiler fills the unused bits of the word a bitmask is stored in with '1' (or randomly, I can't tell, I've seen '1' so far only), which creates wrong results in certain cases.
...
Please review.
llvm-svn: 42061
2007-09-17 21:11:08 +00:00
Fariborz Jahanian
39d641f526
Patch to add objective-c's @protocl type declaration.
...
llvm-svn: 42060
2007-09-17 21:07:36 +00:00
Steve Naroff
f0f2afce5a
Finish defining Action API for message expressions.
...
llvm-svn: 42059
2007-09-17 21:01:15 +00:00
Devang Patel
267c07b51f
Do not eliminate loop when it is invalid to do so. For example,
...
for(int i = 0; i < N; i++) {
if ( i == XYZ) {
A;
else
B;
}
C;
D;
}
llvm-svn: 42058
2007-09-17 21:01:05 +00:00
Ted Kremenek
1abd5c9d8f
Re-added UninitializedValues.cpp to the XCode project because the file was renamed.
...
llvm-svn: 42057
2007-09-17 20:52:52 +00:00
Ted Kremenek
d0b206fd98
Renamed file due to mispelling.
...
llvm-svn: 42056
2007-09-17 20:50:02 +00:00
Ted Kremenek
7e61e81bbf
UninitialuzedValues now only tracks BlockVarDecls; obviating false positives with
...
globals and function parameters.
llvm-svn: 42055
2007-09-17 20:49:30 +00:00
Devang Patel
712dbe9d13
Skeleton for transformations to truncate loop's iteration space.
...
llvm-svn: 42054
2007-09-17 20:39:48 +00:00
Gordon Henriksen
a2f3e13cf4
Fix for PR1633: Verifier doesn't fully verify GC intrinsics
...
LLVM now enforces the following prototypes for the write barriers:
<ty>* @llvm.gcread(<ty2>*, <ty>**)
void @llvm.gcwrite(<ty>*, <ty2>*, <ty>**)
And for @llvm.gcroot, the first stack slot is verified to be an alloca or a
bitcast of an alloca.
Fixes test/CodeGen/Generic/GC/lower_gcroot.ll, which violated these.
llvm-svn: 42051
2007-09-17 20:30:04 +00:00
Steve Naroff
486760aee3
- Refactored ObjcKeywordInfo into ObjcKeywordInfo, ObjcKeywordDecl, and ObjcKeywordMessage.
...
- Removed helper ObjcGetSelectorInfo(), moving the code directly into ObjcBuildMethodDeclaration().
- Many refinements to ParseObjCMessageExpression().
- Add ActOnMessageExpression().
Next step, finish the message actions and (finally) create/instantiate an ObjcMessageExpr AST.
llvm-svn: 42050
2007-09-17 20:25:27 +00:00
Dale Johannesen
ff7e443792
Remove RSTRegClass case from loadRegFromStackSlot
...
and storeRegToStackSlot. Evan and I concluded this
should never be needed and it appears to be true.
(It if is needed, adjustment would be needed for
long double to work.)
llvm-svn: 42049
2007-09-17 20:15:38 +00:00
Devang Patel
9d1af9b63d
Fix comment.
...
llvm-svn: 42048
2007-09-17 20:07:40 +00:00
Devang Patel
77ae4d358f
This is not ideal but unbreaks build failure.
...
APInt::dump() is inside #ifndef NDEBUG, however SelectionDAG dump() routines are not.
llvm-svn: 42047
2007-09-17 20:03:03 +00:00
Ted Kremenek
dd3015375c
More progress on UnitializedValues checker. We now have preliminary support
...
for reporting errors and running the checker.
llvm-svn: 42046
2007-09-17 19:59:27 +00:00
Dale Johannesen
a1336cf57e
Implement x86 long double in jit (not really
...
complete, but common cases work)
llvm-svn: 42043
2007-09-17 18:44:13 +00:00
Chris Lattner
0625bd6472
Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
...
Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.
llvm-svn: 42042
2007-09-17 18:34:04 +00:00
Ted Kremenek
6f0751475a
Split tracking of unitialized values for Decls and CFGBlock-level expressions.
...
llvm-svn: 42041
2007-09-17 18:31:23 +00:00
Daniel Berlin
bd590a8287
That's what i get for using carbon emacs in a terminal
...
llvm-svn: 42040
2007-09-17 18:05:59 +00:00
Daniel Berlin
28ae955181
Fix iterator so it doesn't sometimes report bits that aren't in the bitmap
...
llvm-svn: 42039
2007-09-17 18:04:21 +00:00
Dan Gohman
e903c1021f
Add a utility function to SDOperand for testing if a value is unused.
...
llvm-svn: 42038
2007-09-17 17:44:31 +00:00
Evan Cheng
8070099fef
X86ISD::TEST is dead.
...
llvm-svn: 42037
2007-09-17 17:42:53 +00:00
Chris Lattner
1406f7143b
regenerate
...
llvm-svn: 42036
2007-09-17 17:40:48 +00:00
Dan Gohman
2ac2652779
Instcombine x-((x/y)*y) into a remainder operator.
...
llvm-svn: 42035
2007-09-17 17:31:57 +00:00
Ted Kremenek
789ea076a8
Removed "ObserverTy" from core DataflowValues types. The observer
...
mechanism can be implemented simply by affixing the Observer to an
analysis meta data, so it doesn't need to be a required type. This
also permits analyses not to implement an Observer if it doesn't make
sense.
Changed "DataflowValues::MetaDataTy" to
"DataflowValues::AnalysisDataTy" to reflect that the type
enscapsulated the data associated with analyzing a given CFG.
Changed CFGStmtVisitor::BlockStmt_VisitImplicitControlFlowStmt(Stmt*)
to ...VisitImplicitControlFlowExpr(Expr*). The type narrowing is more
precise and more useful to clients.
Added CFGStmtVisitor::BlockStmt_VisitExpr to reflect the visitation of
expressions at the block statement level. This captures all implicit
control-flow statements as well as other expressions that are hoisted
to the block level (such as conditions for terminators and function
calls). This is especially useful for dataflow analysis.
llvm-svn: 42034
2007-09-17 17:14:52 +00:00
Ted Kremenek
c3fddac8e7
Removed check for NULL CFG. Bad CFGs will fire an assertion failure
...
in the CFG builder logic.
llvm-svn: 42033
2007-09-17 17:10:02 +00:00
Gordon Henriksen
8f0e2f2329
Adding myself to credits.
...
llvm-svn: 42032
2007-09-17 17:04:44 +00:00
Ted Kremenek
cdc0bc45e4
When building CFGs we now (unconditionally) add an empty CFGBlock to the CFG
...
to serve as the entry block. An empty entry block (just as with an
empty exit block, which we already have) simplifies building analyses on top
of CFGs with very little extra overhead.
llvm-svn: 42031
2007-09-17 16:18:02 +00:00
Ted Kremenek
186a669014
Added ASTConsumer.h to XCode project.
...
llvm-svn: 42030
2007-09-17 16:09:32 +00:00
Dan Gohman
3243e10ef0
Add 64-bit jmp instructions to the list of instructions that
...
can terminate a block with no fall-through.
llvm-svn: 42029
2007-09-17 15:19:08 +00:00
Steve Naroff
ed977473fe
Fix a few 80 column violations.
...
llvm-svn: 42028
2007-09-17 15:07:43 +00:00
Dan Gohman
96aee15d33
Use xorl instead of xorq to enter a zero into a 64-bit register.
...
llvm-svn: 42027
2007-09-17 14:55:08 +00:00
Dan Gohman
863bdc332d
Emit integer x<1 as x<=0, as comparisons with zero (now includeing
...
64-bit) can use test instead of cmp with an immediate.
llvm-svn: 42026
2007-09-17 14:49:27 +00:00
Steve Naroff
83763f2c40
Add const to debug hook...
...
llvm-svn: 42025
2007-09-17 14:49:06 +00:00
Dan Gohman
51d1929b9e
Use "test reg,reg" in place of "cmp reg,0" for 64-bit operands. This was
...
previously only done for 32-bit and smaller operands.
llvm-svn: 42024
2007-09-17 14:35:24 +00:00
Steve Naroff
73d534a2e0
Add support for ObjC keyword selectors.
...
- Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable.
- Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo().
- Add SelectorInfo slot to ObjcMethodDecl.
- Add helper function to derive a SelectorInfo from ObjcKeywordInfo.
Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's.
llvm-svn: 42023
2007-09-17 14:16:13 +00:00
Hartmut Kaiser
ffb47d0679
Fixed unterminated string issue.
...
llvm-svn: 42022
2007-09-17 12:29:55 +00:00
Duncan Sands
6d5da71288
Factor the trampoline transformation into a subroutine.
...
llvm-svn: 42021
2007-09-17 10:26:40 +00:00
Chris Lattner
699c2410a8
make var in anon namespace static. Use \n instead of std::endl.
...
llvm-svn: 42020
2007-09-17 06:16:32 +00:00
Dale Johannesen
7511e6b622
Implement x86 long double (uses host long double,
...
so only works on x86 target).
llvm-svn: 42019
2007-09-17 00:38:27 +00:00
Daniel Berlin
90aaa1dcf7
Fix bug in andersen's related to test_and_set.
...
Add operator == and != to SparseBitVector.
Simplify code for test_and_set
llvm-svn: 42018
2007-09-16 23:59:53 +00:00
Daniel Berlin
c637abee96
Fix a few bugs related to zero'ing of elements
...
llvm-svn: 42017
2007-09-16 22:31:47 +00:00
Daniel Berlin
ffce584d1c
Rewrite of andersen's to be about 100x faster, cleaner, and begin to support field sensitivity
...
llvm-svn: 42016
2007-09-16 21:45:02 +00:00
Hartmut Kaiser
af2584fbaf
Silenced a VC++ warning.
...
Updated VC++ project files.
llvm-svn: 42015
2007-09-16 21:35:35 +00:00
Chris Lattner
93c7f855e5
remove some obsolete interfaces.
...
llvm-svn: 42014
2007-09-16 19:47:56 +00:00
Chris Lattner
7ea6ca70f5
switch the llvm emitter to ASTConsumer interface.
...
llvm-svn: 42013
2007-09-16 19:46:59 +00:00
Chris Lattner
aadfe2f973
From Justin Handville:
...
"The ExpectedStr search was starting at the end of the comment string.
This patch starts the search at the beginning of the comment string.
After applying this patch, clang -parse-ast-check on negative test
case source files worked as expected."
llvm-svn: 42012
2007-09-16 19:27:16 +00:00
Chris Lattner
ac81722ff6
Fix html problem, patch by Justin Handville
...
llvm-svn: 42011
2007-09-16 19:25:23 +00:00
Chris Lattner
793d10ca38
fix some warnings, patch by Justin Handville
...
llvm-svn: 42010
2007-09-16 19:23:47 +00:00
Chris Lattner
81b7624c6f
decl counting isn't implemented yet for objc. -stats probably crashes for it.
...
Patch by Justin Handville
llvm-svn: 42009
2007-09-16 19:23:04 +00:00
Bill Wendling
327e1a386c
Follow-up to patch r41999. Make the conditional that emits the personality stub
...
match the conditional that turns on exception handling emittion in the asm
printer.
llvm-svn: 42008
2007-09-16 19:21:08 +00:00
Chris Lattner
b38b0ad095
Fix a GCC warning, patch by Justin Handville
...
llvm-svn: 42007
2007-09-16 19:12:45 +00:00
Chris Lattner
8ad0e6a484
fix warning.
...
llvm-svn: 42006
2007-09-16 19:11:53 +00:00
Dale Johannesen
7f724e9b94
Adjust per revew comments.
...
llvm-svn: 42002
2007-09-16 16:51:49 +00:00
Steve Naroff
2f742085f5
Fixes/tweaks that prevent "defaults-i.m" from compiling.
...
- Allow classnames as the receiver (removing a FIXME from ParseObjCMessageExpression).
- Added a FIXME to ParseObjCMessageExpression()...we need to return a message expr AST node!
llvm-svn: 42001
2007-09-16 16:16:00 +00:00
Steve Naroff
66356bda5d
Rename statement actions (from Parse-prefix to ActOn-prefix).
...
llvm-svn: 42000
2007-09-16 14:56:35 +00:00
Bill Wendling
e5615156cc
Only emit the personality function as a global value if the backend actually
...
supports it. This solves this error on the Darwin x86-64 platform:
$ cat testcase.ii
struct A {
A();
};
A *bork() {
return new A;
}
$ llvm-g++ -arch x86_64 -c testcase.ii
/var/tmp//cc3U8fd8.s:52:unknown section type: non_lazy_symbol_pointers
/var/tmp//cc3U8fd8.s:52:Rest of line ignored. 1st junk character valued 76 (L).
/var/tmp//cc3U8fd8.s:53:Unknown pseudo-op: .indirect_symbol
/var/tmp//cc3U8fd8.s:53:Rest of line ignored. 1st junk character valued 95 (_).
llvm-svn: 41999
2007-09-16 10:36:17 +00:00
Owen Anderson
4cd516b50b
Be more careful when constant-folding PHI nodes.
...
llvm-svn: 41998
2007-09-16 08:04:16 +00:00
Steve Naroff
83895f7888
Rename expression actions (from Parse-prefix to ActOn-prefix).
...
llvm-svn: 41997
2007-09-16 03:34:24 +00:00
Hartmut Kaiser
6d100165ae
Fixed a problem VC++ revealed in release mode. Please verify.
...
llvm-svn: 41996
2007-09-16 00:31:07 +00:00
Hartmut Kaiser
04bd2ef629
Fixed two problems VC++ revealed in release mode. Please verify.
...
llvm-svn: 41995
2007-09-16 00:28:28 +00:00
Hartmut Kaiser
0a6b11db24
Updated VC++ build system.
...
Silenced a couple of VC++ warnings.
llvm-svn: 41994
2007-09-16 00:04:22 +00:00
Chris Lattner
254987c411
switch the various CFG-based stuff over to using ASTConsumer interface,
...
this eliminates their dependence on the preprocessor and eliminates some
duplicated code.
llvm-svn: 41993
2007-09-15 23:21:08 +00:00
Chris Lattner
09c39db0c4
convert ast printer and dumper ocver to ASTConsumer interface,
...
genericizing them and eliminating boilerplate code.
llvm-svn: 41992
2007-09-15 23:02:28 +00:00
Chris Lattner
75e0c8cf4c
add a new ASTConsumer consumer to simplify stuff in the driver.
...
Switch -parse-ast over to it.
llvm-svn: 41991
2007-09-15 22:56:56 +00:00
Chris Lattner
e27d865e36
Initial checkin of rewriter interface. It is just stubbed out for now.
...
llvm-svn: 41990
2007-09-15 22:21:22 +00:00
Chris Lattner
5a4e9d2666
pretty print some nodes more nicely.
...
llvm-svn: 41989
2007-09-15 21:49:37 +00:00
Chris Lattner
1cf7bb15ea
fix comment
...
llvm-svn: 41988
2007-09-15 21:48:50 +00:00
Steve Naroff
30d242c99f
Start converting Action methods from Parse-prefix to ActOn-prefix.
...
The previous naming scheme was confusing, since it resulted in both the Parser and Action modules having methods with the same name. In addition, the Action module never does any parsing...
llvm-svn: 41986
2007-09-15 18:49:24 +00:00
Fariborz Jahanian
29f99d7142
Couple of new classes for objective-c's @protocol typings.
...
llvm-svn: 41985
2007-09-15 18:27:26 +00:00
Chris Lattner
dd76f2f4ab
remove obsolete tests.
...
llvm-svn: 41984
2007-09-15 17:38:04 +00:00
Chris Lattner
4f230451e1
Fix PR1666, SPASS with the CBE and 254.gap with the CBE.
...
GCC optimizes away things like ptr < NULL to false. To "fix" this,
have the CBE emit casts of pointers to intptr_t when doing relational
pointer comparisons.
llvm-svn: 41983
2007-09-15 06:51:03 +00:00
Chris Lattner
6ad68c220a
New testcase for PR1662. GCC trees are horrible :(
...
llvm-svn: 41979
2007-09-15 05:46:41 +00:00
Dan Gohman
48ea03d169
Add patterns for SHLD64* and SHRD64*.
...
llvm-svn: 41975
2007-09-14 23:17:45 +00:00
Ted Kremenek
15d3b38ff2
Added several files to XCode project file...
...
Analysis/DataflowSolver.h
Analysis/UnintializedValues.cpp
include/clang/Analysis/CFGVarDeclVisitor.h
include/clang/Analysis/DataflowValues.h
include/clang/Analysis/UninitializedValues.h
llvm-svn: 41974
2007-09-14 23:13:28 +00:00
Steve Naroff
2e688fde14
Rename Action::ParseRecordBody() to ProcessFieldDecls(), and add a visibility argument.
...
Remove Action::ObjcAddVisibilityToIvars(). No need for an extra API when it is trivial to add this info to the previous hook.
In general, I want to start migrating away from having Actions prefixed with "Parse" (which is confusing, since the Action API doesn't do any parsing, per se).
llvm-svn: 41973
2007-09-14 23:09:53 +00:00
Chris Lattner
6395e5060d
fix a gcc warning: comparison between signed and unsigned integer expressions
...
llvm-svn: 41972
2007-09-14 22:57:00 +00:00
Owen Anderson
3454dd3750
Remove RLE from the headers, since the pass itself is gone now.
...
llvm-svn: 41971
2007-09-14 22:54:46 +00:00
Ted Kremenek
5746d06a5d
Prototype implementation of new template-based dataflow solver.
...
Preliminary implementation of UninitializedValues, which is based on
new solver (doesn't work yet, but compiles).
llvm-svn: 41970
2007-09-14 22:49:21 +00:00
Owen Anderson
8d0cb881e5
Remove RLE. It is subsumed by GVN.
...
llvm-svn: 41968
2007-09-14 22:33:52 +00:00
Dale Johannesen
98d3a08d8f
Remove the assumption that FP's are either float or
...
double from some of the many places in the optimizers
it appears, and do something reasonable with x86
long double.
Make APInt::dump() public, remove newline, use it to
dump ConstantSDNode's.
Allow APFloats in FoldingSet.
Expand X86 backend handling of long doubles (conversions
to/from int, mostly).
llvm-svn: 41967
2007-09-14 22:26:36 +00:00
Steve Naroff
db47ee203a
Several improvement to Sema::ParseRecordBody()...
...
- Adding a safer prologue. The previous prologue would accept a null and therefore assume we had an interface (which was incorrect).
- Fixed FieldDecl's classof method. This allowed me to simplify some unnecessary casting.
- When diagnosing errors, make sure the FieldDecl/EnclosingDecl are marked as invalid. In addition, don't delete the field...rather, add all fields to the enclosing decl. Memory management can/should be done elsewhere. This code was never "upgraded" to the recently added invalid decl strategy.
llvm-svn: 41964
2007-09-14 22:20:54 +00:00
Evan Cheng
483e1ce16e
Add implicit def of EFLAGS on those instructions that may modify flags.
...
llvm-svn: 41962
2007-09-14 21:48:26 +00:00
Fariborz Jahanian
f3287bf871
Patch to store ivars into interface class object.
...
llvm-svn: 41961
2007-09-14 21:08:27 +00:00
Dan Gohman
14cf78cde5
And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoid
...
ambiguity.
llvm-svn: 41960
2007-09-14 20:48:42 +00:00
Dan Gohman
c519c38629
Add explicit triples to avoid default behavior that varies by host.
...
llvm-svn: 41959
2007-09-14 20:37:18 +00:00
Dan Gohman
9da02f5ee2
Remove isReg, isImm, and isMBB, and change all their users to use
...
isRegister, isImmediate, and isMachineBasicBlock, which are equivalent,
and more popular.
llvm-svn: 41958
2007-09-14 20:33:02 +00:00
Dan Gohman
a7b26e6bb3
Change "tmp." to "tmp" for temporaries created by ScalarEvolutionExpander
...
for consistency with many other transforms.
llvm-svn: 41957
2007-09-14 20:11:40 +00:00
Dan Gohman
58c468fb09
Remove spurious consts. This fixes warnings with compilers that
...
are strict about such things.
llvm-svn: 41956
2007-09-14 20:08:19 +00:00
Fariborz Jahanian
aefb23092c
Semantic analysis for objective-c ivars.
...
llvm-svn: 41954
2007-09-14 16:27:55 +00:00
Rafael Espindola
272f7304f0
Add support for functions with byval arguments on x86
...
llvm-svn: 41953
2007-09-14 15:48:13 +00:00
Chris Lattner
5d13fb538f
Fix a logic error in ValueIsOnlyUsedLocallyOrStoredToOneGlobal that caused
...
miscompilation of 188.ammp. Reject select and bitcast in
ValueIsOnlyUsedLocallyOrStoredToOneGlobal because RewriteHeapSROALoadUser can't handle it.
llvm-svn: 41950
2007-09-14 03:41:21 +00:00
Chris Lattner
d9111b88d1
silence a bogus gcc warning.
...
llvm-svn: 41949
2007-09-14 03:07:24 +00:00
Steve Naroff
1d4b5eaeab
Now that the dust has settled on the Decl refactoring, I noticed FieldDecl didn't need NextDeclarator. As a result, I'm removing it.
...
Removing both slots (NextDeclarator/Next) end up reducing the size of fields/ivars by 40%.
llvm-svn: 41948
2007-09-14 02:20:46 +00:00
Evan Cheng
5196f617a1
Fix comments.
...
llvm-svn: 41947
2007-09-14 01:57:02 +00:00
Tanya Lattner
36a6fcd327
Change to 2.2svn.
...
llvm-svn: 41941
2007-09-14 01:24:13 +00:00
Bill Wendling
264d4813c7
Temporary reverting r41817
...
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053370.html ). It's
causing SPASS to fail.
llvm-svn: 41938
2007-09-14 01:13:55 +00:00
Steve Naroff
a23cc79654
Move Decl::NextDeclarator (w/ setters/getters) down to ScopedDecl/FieldDecl.
...
Decl is now svelte:-)
llvm-svn: 41935
2007-09-13 23:52:58 +00:00
Steve Naroff
9def2b15c1
Phase 2 of making the Decl class more lightweight...
...
Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl.
Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later.
llvm-svn: 41934
2007-09-13 21:41:19 +00:00
Chris Lattner
011f91b5b2
Teach GlobalLoadUsesSimpleEnoughForHeapSRA and the SROA rewriter how to handle
...
a limited form of PHI nodes. This finally fixes PR1639, speeding 179.art up
from 7.84s to 3.13s on PPC.
llvm-svn: 41933
2007-09-13 21:31:36 +00:00
Fariborz Jahanian
6812cbb230
Patch for collecting ivars before running action on them.
...
llvm-svn: 41932
2007-09-13 20:56:13 +00:00
Steve Naroff
9324db12b2
Add "ScopedDecl" AST, used by ValueDecl and TypeDecl.
...
This allows us to sink the "Next" field, which isn't used by FieldDecl and ObjcIvarDecl.
llvm-svn: 41931
2007-09-13 18:10:37 +00:00
Chris Lattner
ba98f89388
be tolerant of PHI nodes when rewriting heap SROA code. This is a step
...
along the way of PR1639
llvm-svn: 41930
2007-09-13 18:00:31 +00:00
Chris Lattner
f315d4f1a7
refactor some code, no functionality change. On the path to PR1639
...
llvm-svn: 41929
2007-09-13 17:29:05 +00:00
Chris Lattner
6eed0e7366
Make ValueIsOnlyUsedLocallyOrStoredToOneGlobal smart enough to see through
...
bitcasts and phis. This is a step to fixing PR1639.
llvm-svn: 41928
2007-09-13 16:37:20 +00:00
Chris Lattner
2d2892ee6e
Make AllUsesOfLoadedValueWillTrapIfNull strong enough to see through PHI
...
nodes. This is the first step of the fix for PR1639.
llvm-svn: 41927
2007-09-13 16:30:19 +00:00
Chris Lattner
d3d8aca074
update to match llvm mainline api
...
llvm-svn: 41926
2007-09-13 06:19:18 +00:00
Chris Lattner
3fd6bf8275
remove dead enum value.
...
llvm-svn: 41925
2007-09-13 06:18:04 +00:00
Chris Lattner
6ff85b2e5a
Make single-argument ctors explicit to avoid tricky bugs :)
...
llvm-svn: 41924
2007-09-13 06:15:57 +00:00
Chris Lattner
7955bbd9fd
Fix build problems on Cygwin (PR1652), patch by Patrick Walton.
...
llvm-svn: 41923
2007-09-13 06:09:48 +00:00