David Greene
fb652a7a5c
Have TableGen emit code that uses dbgs() rather than errs().
...
llvm-svn: 92738
2010-01-05 17:47:41 +00:00
Steve Naroff
3d38a68b06
Fix <rdar://problem/7490212> clang rewriter: return of the mixed line endings, which is
...
related to <rdar://problem/6596843> clang ObjC rewriter: Line endings still mixed in rewrite output
This fix was dropped when I integrated the 'objective-rewrite' branch.
llvm-svn: 92737
2010-01-05 17:33:23 +00:00
Devang Patel
d146e2e3df
If a scope has only one instruction then first instruction is also the last instruction.
...
llvm-svn: 92736
2010-01-05 16:59:17 +00:00
Dan Gohman
b5358003fb
Set Changed properly after calling DeleteDeadPHIs.
...
llvm-svn: 92735
2010-01-05 16:31:45 +00:00
Dan Gohman
28943873e6
Use do+while instead of while for loops which obviously have a
...
non-zero trip count. Use SmallVector's pop_back_val().
llvm-svn: 92734
2010-01-05 16:27:25 +00:00
Dan Gohman
92fdb96474
Fix indentation.
...
llvm-svn: 92733
2010-01-05 16:20:55 +00:00
Dan Gohman
cb99fe9839
Make RecursivelyDeleteTriviallyDeadInstructions,
...
RecursivelyDeleteDeadPHINode, and DeleteDeadPHIs return a flag
indicating whether they made any changes.
llvm-svn: 92732
2010-01-05 15:45:31 +00:00
Dan Gohman
1117a59b84
Some versions of GCC don't like non-static data members in sizeof
...
in this context.
llvm-svn: 92731
2010-01-05 15:28:21 +00:00
Dan Gohman
5976e7d5dd
Add a SmallBitVector class, which mimics BitVector but uses only
...
a single pointer (PointerIntPair) member. In "small" mode, the
pointer field is reinterpreted as a set of bits. In "large" mode,
the pointer points to a heap-allocated object.
Also, give BitVector empty and swap functions.
And, add some simple unittests for BitVector and SmallBitVector.
llvm-svn: 92730
2010-01-05 15:04:49 +00:00
Benjamin Kramer
f7cc698b69
Add newline at EOF.
...
llvm-svn: 92727
2010-01-05 13:32:48 +00:00
Benjamin Kramer
ccce8bae14
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
...
llvm-svn: 92726
2010-01-05 13:12:22 +00:00
Zhongxing Xu
f22afe32f9
Move test case to a more appropriate file.
...
llvm-svn: 92725
2010-01-05 11:49:21 +00:00
Zhongxing Xu
e6a238b1df
Add test case.
...
llvm-svn: 92724
2010-01-05 11:47:58 +00:00
Zhongxing Xu
662ba69a15
Revert r92318. Instead fix the analyzer: do not call
...
ASTContext::hasSameUnqualifiedType() when one of the type is VariableArrayType.
llvm-svn: 92723
2010-01-05 09:27:03 +00:00
Zhongxing Xu
cd321a3544
if an arraytype is canonical, then its element is guaranteed to be canonical.
...
llvm-svn: 92715
2010-01-05 08:15:06 +00:00
Chris Lattner
223812d547
prune some #includes.
...
llvm-svn: 92712
2010-01-05 07:54:43 +00:00
Chris Lattner
0a8191ee88
split and/or/xor out into one overly-large (2000LOC) file. However, I think
...
it does make sense to keep them together, at least for now.
llvm-svn: 92711
2010-01-05 07:50:36 +00:00
Chris Lattner
ed41b14f54
missed file with previous commit.
...
llvm-svn: 92710
2010-01-05 07:45:02 +00:00
Chris Lattner
dc67e13442
split instcombine of shifts out to its own file.
...
llvm-svn: 92709
2010-01-05 07:44:46 +00:00
Chris Lattner
e903f38b4d
eliminate getBitCastOperand and simplify some over-complex inbounds stuff.
...
llvm-svn: 92708
2010-01-05 07:42:10 +00:00
Chris Lattner
7a9e47ac4b
split call handling out to InstCombineCalls.cpp
...
llvm-svn: 92707
2010-01-05 07:32:13 +00:00
Chris Lattner
9da1cb243b
optimize cttz and ctlz when we can prove something about the
...
leading/trailing bits. Patch by Alastair Lynn!
llvm-svn: 92706
2010-01-05 07:23:56 +00:00
Chris Lattner
85e65e58ac
this inline function moved to addsub
...
llvm-svn: 92705
2010-01-05 07:20:54 +00:00
Chris Lattner
82aa888e8c
split add/sub out to its own file. Eliminate use of
...
dyn_castNotVal in the X+~X transform. dyn_castNotVal is
dramatic overkill for what the xform needed.
llvm-svn: 92704
2010-01-05 07:18:46 +00:00
Chris Lattner
c7de92ae15
all the places we use hasOneUse() we know are instructions, so inline
...
and simplify.
llvm-svn: 92700
2010-01-05 07:04:23 +00:00
Chris Lattner
c6493f070e
eliminate AssociativeOpt and its last uses.
...
llvm-svn: 92697
2010-01-05 07:01:16 +00:00
Chris Lattner
94694c7f0b
inline the FoldICmpLogical functor.
...
llvm-svn: 92695
2010-01-05 06:59:49 +00:00
Evan Cheng
4facc6116a
Code refactoring.
...
llvm-svn: 92694
2010-01-05 06:52:31 +00:00
Chris Lattner
98d48a0b76
inline the 'AddRHS' transformation, simplifying things significantly.
...
Eliminate the 'AddMaskingAnd' transformation, it is redundant with this
more general code right below it:
// A+B --> A|B iff A and B have no bits set in common.
llvm-svn: 92693
2010-01-05 06:29:13 +00:00
Chris Lattner
39b063bf37
remove massive over-genality manifested as a big template
...
that got instantiated. There is no reason for instcombine
to try this hard for simple associative optimizations. Next
up, eliminate the template completely.
llvm-svn: 92692
2010-01-05 06:24:06 +00:00
Chris Lattner
dc054bf39a
split mul/div/rem instructions out to their own file.
...
llvm-svn: 92689
2010-01-05 06:09:35 +00:00
Chris Lattner
1e7b7b50b1
clean up header.
...
llvm-svn: 92688
2010-01-05 06:05:07 +00:00
Chris Lattner
8f771cb78f
split select out to its own file.
...
llvm-svn: 92687
2010-01-05 06:03:12 +00:00
Nate Begeman
0e1a625fe4
Allow clang to pass -x cl through to compiler driver.
...
llvm-svn: 92686
2010-01-05 06:00:15 +00:00
Chris Lattner
a65e2f7304
split out load/store/alloca.
...
llvm-svn: 92685
2010-01-05 05:57:49 +00:00
Chris Lattner
841af4f03d
reduce indentation
...
llvm-svn: 92684
2010-01-05 05:42:08 +00:00
Chris Lattner
ec97a90221
split vector stuff out to InstCombineVectorOps.cpp
...
llvm-svn: 92683
2010-01-05 05:36:20 +00:00
Chris Lattner
de1feded32
split PHI node stuff out to InstCombinePHI.cpp
...
llvm-svn: 92682
2010-01-05 05:31:55 +00:00
Chris Lattner
27acfcd1c4
convert various IntrinsicInst's to use class instead of struct.
...
llvm-svn: 92681
2010-01-05 05:21:26 +00:00
Anders Carlsson
a0b025e40f
When emitting member function pointers, use the canonical decl if the member function is virtual. Fixes PR5940.
...
llvm-svn: 92680
2010-01-05 05:04:05 +00:00
Chris Lattner
f741d72b84
fix an infinite loop in reassociate building emacs.
...
llvm-svn: 92679
2010-01-05 04:55:35 +00:00
Mike Stump
d4c4fc4440
Add a radar reference.
...
llvm-svn: 92678
2010-01-05 03:16:33 +00:00
Mike Stump
8971a86538
Disallow captured arrays in blocks as well. Radar 7438948.
...
llvm-svn: 92677
2010-01-05 03:10:36 +00:00
Mike Stump
7dafa0d048
Disallow capturing vlas inside blocks.
...
llvm-svn: 92676
2010-01-05 02:56:35 +00:00
Ted Kremenek
acd71a4562
Make static analysis support for C++ 'this' expression context-sensitive. Essentially treat 'this' as a implicit parameter to the method call, and associate a region with it.
...
llvm-svn: 92675
2010-01-05 02:18:06 +00:00
David Greene
a0e1ee828a
Change this back to errs().
...
llvm-svn: 92674
2010-01-05 01:55:22 +00:00
David Greene
1df14c41b5
These should probably be errs().
...
llvm-svn: 92673
2010-01-05 01:53:59 +00:00
Devang Patel
33f80d2303
Delete renaming use of dead dbg intrinsics.
...
Intrinsic::dbg_stoppoint
Intrinsic::dbg_region_start
Intrinsic::dbg_region_end
Intrinsic::dbg_func_start
llvm-svn: 92672
2010-01-05 01:47:06 +00:00
Devang Patel
43ef34d2a5
Use StringRef.startswith().
...
llvm-svn: 92671
2010-01-05 01:46:14 +00:00
David Greene
c976131fe9
Fix a build error by adding a missing commit.
...
llvm-svn: 92670
2010-01-05 01:36:30 +00:00