1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

51680 Commits

Author SHA1 Message Date
Evan Cheng
c3ef5b0802 Follow up to 81494. When the folded reload is narrowed to a 32-bit load then change the destination register to a 32-bit one or add a sub-register index.
llvm-svn: 81496
2009-09-11 01:01:31 +00:00
Chris Lattner
b5243d77cb PHI nodes can never reach the asmprinter, assert and die instead of printing
out an illegal "PHINODE" instruction.

llvm-svn: 81495
2009-09-11 00:41:15 +00:00
Evan Cheng
93831c07de It's not legal to fold a load from a narrower stack slot into a wider instruction. If done, the instruction does a 64-bit load and that's not
safe. This can happen we a subreg_to_reg 0 has been coalesced. One
exception is when the instruction that folds the load is a move, then we
can simply turn it into a 32-bit load from the stack slot.                                                                                                                    

rdar://7170444

llvm-svn: 81494
2009-09-11 00:39:26 +00:00
Dan Gohman
685eb70d06 Make fast-isel try ISD::FNEG before resorting to bitcasts and xors.
llvm-svn: 81493
2009-09-11 00:36:43 +00:00
Dan Gohman
964c0b8333 Reapply r81171 with a fix: don't try to use i64 when it
isn't legal.

llvm-svn: 81492
2009-09-11 00:34:46 +00:00
Dan Gohman
9040a3526e Fix indentation.
llvm-svn: 81484
2009-09-11 00:05:10 +00:00
Dan Gohman
aa66e3d968 Teach lib/VMCore/ConstantFold.cpp how to set the inbounds keyword and
how to fold notionally-out-of-bounds array getelementptr indices instead
of just doing these in lib/Analysis/ConstantFolding.cpp, because it can
be done in a fairly general way without TargetData, and because not all
constants are visited by lib/Analysis/ConstantFolding.cpp. This enables
more constant folding.

Also, set the "inbounds" flag when the getelementptr indices are
one-past-the-end.

llvm-svn: 81483
2009-09-11 00:04:14 +00:00
Dan Gohman
58a0550024 Factor out the code for checking that all indices in a getelementptr are
within the notional bounds of the static type of the getelementptr (which
is not the same as "inbounds") from GlobalOpt into a utility routine,
and use it in ConstantFold.cpp to check whether there are any mis-behaved
indices.

llvm-svn: 81478
2009-09-10 23:37:55 +00:00
Dan Gohman
97819c7fe8 Give these files top-level comments that describe the current code.
llvm-svn: 81473
2009-09-10 23:07:18 +00:00
Devang Patel
e55527b3f2 Fix whitespaces.
llvm-svn: 81468
2009-09-10 22:36:12 +00:00
Bill Wendling
2d374c78f6 Fix validation errors.
llvm-svn: 81466
2009-09-10 22:14:16 +00:00
Bill Wendling
7473700cd5 Fix validation errors.
llvm-svn: 81465
2009-09-10 22:12:50 +00:00
Bob Wilson
7b39f31422 Don't swap the operands of a subtraction when trying to create a
post-decrement load/store.

llvm-svn: 81464
2009-09-10 22:09:31 +00:00
Dale Johannesen
fa355ddba3 Fix uppercaseo.
llvm-svn: 81463
2009-09-10 22:01:32 +00:00
Kevin Enderby
9f0fb453d8 Added the ParseInstruction() hook for target specific assembler directives so
that things like .word can be parsed as target specific.  Moved parsing .word
out of AsmParser.cpp into X86AsmParser.cpp as it is 2 bytes on X86 and 4 bytes
for other targets that support the .word directive.

llvm-svn: 81461
2009-09-10 20:51:44 +00:00
Victor Hernandez
bcdf5ed5ae Fit code within 80 columns
llvm-svn: 81459
2009-09-10 20:18:57 +00:00
Sean Callanan
9bf1cfc585 Added XOR instructions for rAX and immediates of
various widths.

llvm-svn: 81458
2009-09-10 19:52:26 +00:00
Sean Callanan
5e1568e95e Added MOV instructions between rAX and memory offsets,
including segment offsets and (for 8-bit operands)
absolute offsets.

llvm-svn: 81457
2009-09-10 18:33:42 +00:00
Sean Callanan
ce27a0feb7 Added a variety of PUSH and POP instructions, including
ones capable of accessing R/M operands instead of just
registers.

llvm-svn: 81456
2009-09-10 18:29:13 +00:00
Bill Wendling
68a3bafe53 Exit early if exception handling isn't supported.
llvm-svn: 81454
2009-09-10 18:28:06 +00:00
Mikhail Glushenkov
77f3e5deee Allow llvmc to take .bc files as input.
llvm-svn: 81452
2009-09-10 17:04:32 +00:00
Andreas Neustifter
7a526c9491 Make ProfileEstimator more robust on general CFGs.
llvm-svn: 81450
2009-09-10 16:30:38 +00:00
Chris Lattner
baa8f93b1c add another broken version of gcc, thanks to Niels Moller for pointing this out.
llvm-svn: 81449
2009-09-10 16:25:02 +00:00
Mikhail Glushenkov
65831e2bf2 Distinguish between 'empty' and empty DAG marker.
llvm-svn: 81448
2009-09-10 16:22:02 +00:00
Mikhail Glushenkov
49c2b6f4fb Add a logical 'not' operator to llvmc's TableGen dialect.
llvm-svn: 81447
2009-09-10 16:21:38 +00:00
Nuno Lopes
a79196d2a9 fix leakage of Module
llvm-svn: 81445
2009-09-10 14:56:31 +00:00
Benjamin Kramer
200a6693fb Add some braces to make newer GCCs happy and update CMakeLists.
llvm-svn: 81443
2009-09-10 11:31:39 +00:00
Andreas Neustifter
4d8afb529c Cleaned up code by factoring out common portions of edge loading into function.
llvm-svn: 81438
2009-09-10 07:12:35 +00:00
Nick Lewycky
d347108b4d Correctly handle the case where a comparison is created in one BasicBlock and
used by a terminator in another.

llvm-svn: 81437
2009-09-10 07:02:09 +00:00
Bill Wendling
23f9e3a98e Comment and whitespace cleanups. No intentional functionality change.
llvm-svn: 81436
2009-09-10 06:50:01 +00:00
Bill Wendling
988ed7ed19 Revert part of my r81424 patch. I removed what looked like superfluous padding
from the exception tables. However, Duncan explained why it's a can of worms to
do it the GCC way. I went back to doing it the LLVM way and added Duncan's
explanation so that I don't do this again in the future.

llvm-svn: 81434
2009-09-10 06:27:16 +00:00
Evan Cheng
d3f98b1d15 Add a test case for r81431.
llvm-svn: 81432
2009-09-10 05:08:51 +00:00
Daniel Dunbar
b15a757410 Remove prcontext.
llvm-svn: 81427
2009-09-10 04:56:59 +00:00
Evan Cheng
78182244f1 Add malloc call utility functions. Patch by Victor Hernandez.
llvm-svn: 81426
2009-09-10 04:36:43 +00:00
Bill Wendling
4ee473352a Don't hardcode the TType format size. In fact, rework the code so that it's more
like what GCC outputs. The mysterious code to insert padding wasn't in GCC at
all. I modified the TType base offset code to calculate the offset like GCC
does, though.

llvm-svn: 81424
2009-09-10 02:07:37 +00:00
Evan Cheng
0e0590db1b Proper support of non-lazy indirect symbols.
llvm-svn: 81422
2009-09-10 01:23:53 +00:00
Bill Wendling
11a9ab2879 Remove the "#if 0" that Noone loved. It wasn't really necessary, because the
code within it was the same inside and out. There's still a problem of the
TypeInfoSize should be the size of the TType format encoding (at least that's
what GCC thinks it should be).

llvm-svn: 81417
2009-09-10 01:12:47 +00:00
Daniel Dunbar
bae4e52bd0 MC: Give target specific parsers access to the MCStreamer.
llvm-svn: 81416
2009-09-10 00:59:15 +00:00
Bob Wilson
76cffeddd1 Revert r81171 which was causing pr4927.
llvm-svn: 81415
2009-09-10 00:49:22 +00:00
Bill Wendling
0ec5ddeecf Pull check for SJLJ EH into a boolean and use that.
llvm-svn: 81409
2009-09-10 00:17:04 +00:00
Bill Wendling
bf36b07bff Use the SizeOfEncodedValue function instead of magic variables for the
sizeof(DW_EH_PE_udata4).

llvm-svn: 81408
2009-09-10 00:13:16 +00:00
Bill Wendling
e55fe46dec Add helpful comment.
llvm-svn: 81406
2009-09-10 00:04:48 +00:00
Bill Wendling
ef6636d4b1 Believe it or not, this is a simplification. :-)
Basically, this patch is working towards removing the hard-coded values that are
output for the CIE. In particular, the CIE augmentation and the CIE augmentation
size. Both of these should be calculated. In the process, I was able to make a
bunch of code simpler.

The encodings for the personality, LSDA, and FDE in the CIE are still not
correct. They should be generated either from target-specific callbacks (blech!)
or grokked from first-principles.

llvm-svn: 81404
2009-09-09 23:56:55 +00:00
Evan Cheng
7f25e554e4 Fix double load / store multiple encoding.
llvm-svn: 81403
2009-09-09 23:55:03 +00:00
Chris Lattner
9975e8e31a canonicalize namespace gymnastics
llvm-svn: 81402
2009-09-09 23:46:42 +00:00
Dale Johannesen
181999c0a6 Testcase for (llvm-gcc) 81399. Adjust an older
test case to allow for different, functionally
identical output.

llvm-svn: 81400
2009-09-09 23:37:46 +00:00
Bob Wilson
877a857b4b Fix pr4939: Change FPCCToARMCC to translate SETOLE to ARMCC::LS.
See the bug report for details.

llvm-svn: 81397
2009-09-09 23:14:54 +00:00
Chris Lattner
b9aca1a178 remove DebugLoc from MCInst and eliminate "Comment printing" from
the MCInst path of the asmprinter.  Instead, pull comment printing
out of the autogenerated asmprinter into each target that uses the
autogenerated asmprinter.  This causes code duplication into each
target, but in a way that will be easier to clean up later when more
asmprinter stuff is commonized into the base AsmPrinter class.

This also fixes an xcore strangeness where it inserted two tabs
before every instruction.

llvm-svn: 81396
2009-09-09 23:14:36 +00:00
Chris Lattner
2a098581a8 Fix a subtle bug in "return;" generation which caused us to miss
a return in one case.  Instead of sprinking return handling code
throughout the asmprinter generator, just treat it like any other
normal statement.

llvm-svn: 81395
2009-09-09 23:09:29 +00:00
Daniel Dunbar
51a6624b92 Add comment re: clang dependency.
llvm-svn: 81393
2009-09-09 23:01:25 +00:00