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
Rafael Espindola
3937ded624
Fix a silly bug I introduced when dropping std::string.
...
llvm-svn: 125420
2011-02-12 00:19:56 +00:00
Ted Kremenek
b1c392aa56
Don't emit a dead store for '++' operations unless it occurs with a return statement. We've never seen any other cases that were real bugs.
...
Fixes <rdar://problem/6962292>.
llvm-svn: 125419
2011-02-12 00:17:19 +00:00
Johnny Chen
a222c04588
Add EmulateBXRm() ("Branch and Exchange") to both g_arm_opcodes and g_thumb_opcodes table.
...
llvm-svn: 125418
2011-02-12 00:10:51 +00:00
Jeffrey Yasskin
c498878e6d
Add CMake dependencies so that LLVM_USED_LIBS order doesn't matter.
...
I also sorted the tools/driver dependencies since their order no
longer matters.
llvm-svn: 125417
2011-02-11 23:46:38 +00:00
Johnny Chen
722d4e4aa0
Add a couple of utility functions plus some comments.
...
llvm-svn: 125416
2011-02-11 23:29:14 +00:00
Ted Kremenek
9865d7f0e6
Don't report dead stores on unreachable code paths. Fixes <rdar://problem/8405222>.
...
llvm-svn: 125415
2011-02-11 23:24:26 +00:00
Caroline Tice
7b37670d56
- Add three more instruction contexts to EmulateInstruction:
...
eContextAdjustBaseRegister, eContextRegisterStore and
eContextWriteMemoryRandomBits.
- Implement a version of WriteBits32UnknownToMemory for writing to memory.
- Modify EmulateLDM, EmulateLDMDA, EmulateLDMDB and EmulateLDMIB to use the
eContextAdjustBaseRegister context when appropriate.
- Add code to emulate the STM/STMIA/STMEA Arm instruction.
llvm-svn: 125414
2011-02-11 22:49:54 +00:00
Johnny Chen
a61541663c
Add EmulateCmpRnRm() for Encodings T1 & T2 to the g_thumb_opcodes table to emulate
...
CMP (register) operations.
llvm-svn: 125413
2011-02-11 21:53:58 +00:00
Chris Lattner
39b6d87e9f
attempt to capture recent discussion about overflow and inbounds geps.
...
llvm-svn: 125412
2011-02-11 21:50:52 +00:00
Benjamin Kramer
1800d823de
Also fold (A+B) == A -> B == 0 when the add is commuted.
...
llvm-svn: 125411
2011-02-11 21:46:48 +00:00
Chris Lattner
7936a8a488
Per discussion with Dan G, inbounds geps *certainly* can have
...
unsigned overflow (e.g. "gep P, -1"), and while they can have
signed wrap in theoretical situations, modelling an AddRec as
not having signed wrap is going enough for any case we can
think of today. In the future if this isn't enough, we can
revisit this. Modeling them as having NUW isn't causing any
known problems either FWIW.
llvm-svn: 125410
2011-02-11 21:43:33 +00:00
Chris Lattner
d3c0e05f51
When lowering an inbounds gep, the intermediate adds can have
...
unsigned overflow (e.g. due to a negative array index), but
the scales on array size multiplications are known to not
sign wrap.
llvm-svn: 125409
2011-02-11 21:37:43 +00:00
Jim Grosbach
860a84d65a
Tidy out asm matcher .inc output.
...
llvm-svn: 125408
2011-02-11 21:31:55 +00:00
Zhanyong Wan
f3c0ff730b
Uses llvm::sys::path instead of hand-rolled algorithm in FileManager.
...
Reviewed by dgregor.
llvm-svn: 125407
2011-02-11 21:25:35 +00:00
Zhanyong Wan
606bb1a2dc
Adds llvm::sys::path::is_separator() to test whether a char is a path separator
...
on the host OS. Reviewed by dgregor.
llvm-svn: 125406
2011-02-11 21:24:40 +00:00
Johnny Chen
c6ca7bb67a
Rearraned some emulate instruction entries under the appropriate category.
...
llvm-svn: 125405
2011-02-11 21:23:32 +00:00
Nate Begeman
fa62d50481
Implement sdiv & udiv for <4 x i16> and <8 x i8> NEON vector types.
...
This avoids moving each element to the integer register file and calling __divsi3 etc. on it.
llvm-svn: 125402
2011-02-11 20:53:29 +00:00
Ted Kremenek
6cc8f5d83c
Add test case for PR 8646.
...
llvm-svn: 125401
2011-02-11 20:13:27 +00:00
Johnny Chen
259326c821
Instead of self.runCmd(), do a stronger self.expect("process status") which also
...
checks that the process is stopped due to breakpoint at the specified line no.
llvm-svn: 125400
2011-02-11 20:11:06 +00:00
Peter Collingbourne
de32b20bdd
Reject forbidden storage class specifiers in OpenCL. Patch by George Russell!
...
llvm-svn: 125399
2011-02-11 19:59:54 +00:00