Commit Graph

100780 Commits

Author SHA1 Message Date
Chris Lattner eaa8341d3b fix two comment thinkos
llvm-svn: 125481
2011-02-14 06:14:42 +00:00
Nick Lewycky 00661a0b03 Fix typo in comment.
llvm-svn: 125480
2011-02-14 06:14:20 +00:00
Peter Collingbourne cb26ef94d4 Add missing file
llvm-svn: 125478
2011-02-14 02:14:26 +00:00
Cameron Zwarich 3005ee396d Add some statistics to StrongPHIElimination.
llvm-svn: 125477
2011-02-14 02:09:18 +00:00
Cameron Zwarich 8790396e6a Add a statistic to PHIElimination tracking the number of critical edges split.
llvm-svn: 125476
2011-02-14 02:09:11 +00:00
Peter Collingbourne 7ce13fc940 OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas.  Patch originally by ARM.

llvm-svn: 125475
2011-02-14 01:42:53 +00:00
Peter Collingbourne 564c0fa47a Move support for "#pragma STDC FP_CONTRACT" to Parser; add Sema actions
llvm-svn: 125474
2011-02-14 01:42:35 +00:00
Peter Collingbourne 3bffa52933 Make LexOnOffSwitch a Preprocessor member function
llvm-svn: 125473
2011-02-14 01:42:24 +00:00
Chris Lattner 1b2748d32f missed a header
llvm-svn: 125471
2011-02-13 22:30:09 +00:00
Chris Lattner 46c01a30f4 Enhance ComputeMaskedBits to know that aligned frameindexes
have their low bits set to zero.  This allows us to optimize
out explicit stack alignment code like in stack-align.ll:test4 when
it is redundant.

Doing this causes the code generator to start turning FI+cst into
FI|cst all over the place, which is general goodness (that is the
canonical form) except that various pieces of the code generator
don't handle OR aggressively.  Fix this by introducing a new
SelectionDAG::isBaseWithConstantOffset predicate, and using it
in places that are looking for ADD(X,CST).  The ARM backend in
particular was missing a lot of addressing mode folding opportunities
around OR.

llvm-svn: 125470
2011-02-13 22:25:43 +00:00
Tobias Grosser db8a18c788 Adapt docs to '-loopsimplify -> -loop-simplify' change
llvm-svn: 125469
2011-02-13 20:57:25 +00:00
Fariborz Jahanian 12834e19c1 Use hasSameType in one more, hopefully, last place.
llvm-svn: 125468
2011-02-13 20:11:42 +00:00
Fariborz Jahanian 4de45dc6a7 Some refactoring and using more modern APIs for
implementation of co/contra-variance objc++
block pointers. // rdar://8979379.

llvm-svn: 125467
2011-02-13 20:01:48 +00:00
Chris Lattner 3466ca34bc fix thinko :)
llvm-svn: 125466
2011-02-13 19:53:36 +00:00
Chris Lattner e95d195014 Revisit my fix for PR9028: the issue is that DAGCombine was
generating i8 shift amounts for things like i1024 types.  Add
an assert in getNode to prevent this from occuring in the future,
fix the buggy transformation, revert my previous patch, and
document this gotcha in ISDOpcodes.h

llvm-svn: 125465
2011-02-13 19:09:16 +00:00
Chris Lattner 9bd7fdff58 remove a now-unneccesary cast.
llvm-svn: 125464
2011-02-13 18:30:09 +00:00
Duncan Sands b86070933f Remove pointless blank line.
llvm-svn: 125463
2011-02-13 18:11:05 +00:00
Duncan Sands d114ab331c Teach instsimplify that X+Y>=X+Z is the same as Y>=Z if neither side overflows,
plus some variations of this.  According to my auto-simplifier this occurs a lot
but usually in combination with max/min idioms.  Because max/min aren't handled
yet this unfortunately doesn't have much effect in the testsuite.

llvm-svn: 125462
2011-02-13 17:15:40 +00:00
Nadav Rotem 0e162c57f8 Fix test
llvm-svn: 125460
2011-02-13 16:13:16 +00:00
Nadav Rotem 27b848afb0 Fix a regression from r125393;
It caused a crash in MultiSource/Benchmarks/Bullet.
Opt hit an assertion with "opt -std-compile-opts" because
Constant::getAllOnesValue doesn't know how to handle floats.

This patch added a test to reproduce the problem and a check that the
destination vector is of integer type.

Thank you Benjamin!

llvm-svn: 125459
2011-02-13 15:45:34 +00:00
Chris Lattner d5f0b1148a when legalizing extremely wide shifts, make sure that
the shift amounts are in a suitably wide type so that
we don't generate out of range constant shift amounts.

This fixes PR9028.

llvm-svn: 125458
2011-02-13 09:10:56 +00:00
Chris Lattner 2a720d933a fix visitShift to properly zero extend the shift amount if the provided operand
is narrower than the shift register.  Doing an anyext provides undefined bits in
the top part of the register.

llvm-svn: 125457
2011-02-13 09:02:52 +00:00
Chris Lattner 20541a6da6 improve solaris support, from PR9109, patch by Yuri!
llvm-svn: 125456
2011-02-13 08:38:44 +00:00
Chris Lattner 333e27d74b add PR#
llvm-svn: 125455
2011-02-13 08:27:31 +00:00
Chris Lattner 43273affb9 implement instcombine folding for things like (x >> c) < 42.
We were previously simplifying divisions, but not right shifts!

llvm-svn: 125454
2011-02-13 08:07:21 +00:00
Chris Lattner a61abfaf4c add a helper method.
llvm-svn: 125453
2011-02-13 08:04:16 +00:00
Argyrios Kyrtzidis 9f5055f037 Wrap the struct in an anonymous namespace.
llvm-svn: 125452
2011-02-13 07:51:19 +00:00
Chris Lattner d369f575d7 refactor some code out into a helper method.
llvm-svn: 125451
2011-02-13 07:43:07 +00:00
John McCall 8322c3a197 Give some convenient idiomatic accessors to Stmt::child_range and
Stmt::const_child_range, then make a bunch of places use them instead
of the individual iterator accessors.

llvm-svn: 125450
2011-02-13 04:07:26 +00:00
Chris Lattner 4f23f2be15 teach SCEV that the scale and addition of an inbounds gep don't NSW.
This fixes a FIXME in scev-aa.ll (allowing a new no-alias result) and
generally makes things more precise.

llvm-svn: 125449
2011-02-13 03:14:49 +00:00
John McCall 2b3c5538fa Look through array types when deciding whether a field requires non-trivial
destruction in the destructor-aliases logic.  Fixes PR 9197.

llvm-svn: 125447
2011-02-13 00:46:43 +00:00
Reid Kleckner 2406b7d179 Add encodings and mnemonics for FXSAVE64 and FXRSTOR64.
These are just FXSAVE and FXRSTOR with REX.W prefixes.  These versions use
64-bit pointer values instead of 32-bit pointer values in the memory map they
dump and restore.

llvm-svn: 125446
2011-02-12 23:24:13 +00:00
Fariborz Jahanian 42455ea935 Implement objective-c++'s block pointer type matching involving
types which are contravariance in argument types and covariance
in return types. // rdar://8979379.

llvm-svn: 125445
2011-02-12 19:07:46 +00:00
Venkatraman Govindaraju 0c1f65317b Prevent IMPLICIT_DEF/KILL to become a delay filler instruction in SPARC backend.
llvm-svn: 125444
2011-02-12 19:02:33 +00:00
Ted Kremenek c059798756 Teach the IdempotentOperations checker to ignore property setters.
llvm-svn: 125443
2011-02-12 18:50:03 +00:00
Daniel Dunbar 210ce0feb5 SimplifyLibCalls: Add missing legalize check on various printf to puts and
putchar transforms, their return values are not compatible.

llvm-svn: 125442
2011-02-12 18:19:57 +00:00
Daniel Dunbar 76c95562bc tests: FileCheckize
llvm-svn: 125441
2011-02-12 18:19:53 +00:00
Rafael Espindola 8cc5910dbc Preserve aliases if needed.
llvm-svn: 125439
2011-02-12 18:03:13 +00:00
Benjamin Kramer 69affe6a94 Add a note about SSE4.1 roundss/roundsd.
llvm-svn: 125438
2011-02-12 17:58:16 +00:00
Nadav Rotem db2f54811d A fix for 9165.
The DAGCombiner created illegal BUILD_VECTOR operations.
The patch added a check that either illegal operations are
allowed or that the created operation is legal.

llvm-svn: 125435
2011-02-12 14:40:33 +00:00
Argyrios Kyrtzidis 9fdd25492c When reading the AST, delay loading of the redeclaration chain to avoid deeply nested calls.
Temporarily set the first (canonical) declaration as the previous one, which is the one that
matters, and mark the real previous DeclID to be loaded & attached later on.

Fixes rdar://8956193.

llvm-svn: 125434
2011-02-12 07:50:47 +00:00
Greg Clayton 71fc2a33b5 Added the ability to detect which vCont packets (using the "vCont?") packet
are supported by the remote GDB target. We can also now deal with the lack of
vCont support and send packets that the remote GDB stub can use. We also error
out of the continue if LLDB tries to do something too complex when vCont isn't
supported.

llvm-svn: 125433
2011-02-12 06:28:37 +00:00
Ted Kremenek ba6ead4bc0 Update static analyzer build to checker-255.
llvm-svn: 125432
2011-02-12 03:20:34 +00:00
Ted Kremenek 70aeefa17e Weaken the ObjCSelfInitChecker to only warn when one calls an 'init' method within an 'init' method. This is a temporary stop gap to avoid false positives while we investigate how to make it smarter.
llvm-svn: 125427
2011-02-12 03:03:54 +00:00
Jim Grosbach 861e49ce3b AsmMatcher custom operand parser failure enhancements.
Teach the AsmMatcher handling to distinguish between an error custom-parsing
an operand and a failure to match. The former should propogate the error
upwards, while the latter should continue attempting to parse with
alternative matchers.

Update the ARM asm parser accordingly.

llvm-svn: 125426
2011-02-12 01:34:40 +00:00
Johnny Chen b3b8e0ffc2 Add entries for Encodings T1 and A1 of "MVN (immediate)" to g_arm_opcodes and g_thumb_opcodes
tables.  The corresponding EmulateMvnRdImm() method impl is empty for now.

llvm-svn: 125425
2011-02-12 01:27:26 +00:00
Ted Kremenek 395f1ac038 Add test case for <rdar://problem/6888289>.
llvm-svn: 125424
2011-02-12 01:25:04 +00:00
Johnny Chen 61938f795f Changed comments of some functions to be consistent with existing ones.
llvm-svn: 125423
2011-02-12 01:01:40 +00:00
Ted Kremenek 10b5926e29 static analyzer: Also invalidate instance variables of a receiver in a message expression, just as we do with parameters.
Fixes <rdar://problem/8725041>.

llvm-svn: 125422
2011-02-12 01:01:31 +00:00
Johnny Chen 1173fbdc4b Add helper methods InITBlock() and LastInITBlock() to EmulateInstructionARM class
instead of calling out to m_it_session.InITBlock()/LastInITBlock(), which simplifies
the coding a bit.

llvm-svn: 125421
2011-02-12 00:50:05 +00:00