Commit Graph

5884 Commits

Author SHA1 Message Date
Chris Lattner
6bdcda3d3e Keep track of *which* input constraint matches an output
constraint.  Reject asms where an output has multiple
input constraints tied to it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57687 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 16:47:46 +00:00
Chris Lattner
58f15c482a add an assert so that PR2356 explodes instead of running off an
array.  Improve some minor comments, refactor some helpers in
AsmOperandInfo.  No functionality change for valid code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57686 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 16:21:11 +00:00
Evan Cheng
6784598895 Fix a very subtle spiller bug: UpdateKills should not forget to track defs of aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57673 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 06:16:07 +00:00
Dan Gohman
74feef261a Define patterns for shld and shrd that match immediate
shift counts, and patterns that match dynamic shift counts
when the subtract is obscured by a truncate node.

Add DAGCombiner support for recognizing rotate patterns
when the shift counts are defined by truncate nodes.

Fix and simplify the code for commuting shld and shrd
instructions to work even when the given instruction doesn't
have a parent, and when the caller needs a new instruction.

These changes allow LLVM to use the shld, shrd, rol, and ror
instructions on x86 to replace equivalent code using two
shifts and an or in many more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57662 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-17 01:23:35 +00:00
Dan Gohman
131161bc6e Rename AliasSet to SubRegs, to reflect changes in the surrounding code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57618 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 01:06:18 +00:00
Dan Gohman
7ddcadc7ee Move the include of MachineLocation.h into MachineModuleInfo.h
because it declares a std::vector<MachineMove>, and strict
concept checking requires the definition of MachineMove to be
available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57617 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:20:14 +00:00
Dan Gohman
b382c4dc23 Fix a subtle bug in DeadMachineInstructionElim's liveness
computation. A def of a register doesn't necessarily kill
live super-registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16 00:11:23 +00:00
Dan Gohman
26367472a2 Adjust whitespace in debug messages to be more consistent
with other debug messages.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57543 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 02:57:38 +00:00
Evan Cheng
7f04268176 - Add target lowering hooks that specify which setcc conditions are illegal,
i.e. conditions that cannot be checked with a single instruction. For example,
SETONE and SETUEQ on x86.
- Teach legalizer to implement *illegal* setcc as a and / or of a number of
legal setcc nodes. For now, only implement FP conditions. e.g. SETONE is
implemented as SETO & SETNE, SETUEQ is SETUO | SETEQ.
- Move x86 target over.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-15 02:05:31 +00:00
Dan Gohman
dd5b58ad7b FastISel support for exception-handling constructs.
- Move the EH landing-pad code and adjust it so that it works
   with FastISel as well as with SDISel.
 - Add FastISel support for @llvm.eh.exception and
   @llvm.eh.selector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:54:11 +00:00
Evan Cheng
0329466b6b Rename LoadX to LoadExt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 21:26:46 +00:00
Dan Gohman
b8cab9227a Fix command-line option printing to print two spaces where needed,
instead of requiring all "short description" strings to begin with
two spaces. This makes these strings less mysterious, and it fixes
some cases where short description strings mistakenly did not
begin with two spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57521 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 20:25:08 +00:00
Evan Cheng
efa533957d FIX PR2794. Make sure SIGN_EXTEND_INREG nodes introduced by LegalizeSetCCOperands are leglized. Patch by Richard Pennington.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57460 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 18:46:18 +00:00
Evan Cheng
195cd3a58d Also update sub-register intervals after a trivial computation is rematt'ed for a copy instruction. PR2775.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57458 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 18:35:52 +00:00
Matthijs Kooijman
d9d07780ff * Make TargetLowering not crash when TargetMachine::getTargetAsmInfo() returns
null. This assumes that any target that does not have AsmInfo, does not
   support "LocAndDot".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57438 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 12:41:46 +00:00
Matthijs Kooijman
e2b997b7b5 Make MachineFunction not crash when TargetMachine::getRegisterInfo() returns
NULL, but just hide some debug output then.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57437 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 12:37:16 +00:00
Chris Lattner
44d2a983b7 calls can be supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57428 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 01:59:13 +00:00
Owen Anderson
d55fccde4c Fix a bug in live-in detection that caused lost-copy problems to show up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57424 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 20:39:30 +00:00
Chris Lattner
99cbdff66c fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57388 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 23:59:03 +00:00
Chris Lattner
e563bbc312 Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's as
parameters instead of raw Constants.  This prevents the constants from
being selected by the isel pass, fixing PR2735.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57385 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 22:08:30 +00:00
Chris Lattner
3c26101669 simplify comparison
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57371 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 00:08:02 +00:00
Dale Johannesen
8b1e054938 Remove some overzealous checks that were rejecting
valid comments in inline assembly.
gcc.target/i386/20011009-1.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57365 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 21:04:42 +00:00
Mon P Wang
5ca6bd14a0 Added missing print functions that take a raw_ostream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57339 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 01:43:55 +00:00
Dale Johannesen
23a98551ab Add a "loses information" return value to APFloat::convert
and APFloat::convertToInteger.  Restore return value to
IEEE754.  Adjust all users accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57329 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-09 23:00:39 +00:00
Dale Johannesen
7111b02c73 Rename APFloat::convertToAPInt to bitcastToAPInt to
make it clearer what the function does.  No functional
change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57325 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-09 18:53:47 +00:00
Dale Johannesen
d65b26495d Align EH tables before label is emitted, not after,
thus aligning the label.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57310 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-08 21:50:21 +00:00
Owen Anderson
04764deac8 Fix the case where an instruction is not properly marked as using all registers that alias its inputs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57286 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-08 04:30:51 +00:00
Dan Gohman
eb0d6abee3 Remove -disable-fast-isel. Use cl::boolOrDefault with -fast-isel
instead.

So now: -fast-isel or -fast-isel=true enable fast-isel, and
-fast-isel=false disables it. Fast-isel is also on by default
with -fast, and off by default otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57270 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 23:00:56 +00:00
Dan Gohman
1e9e8c3bd5 Avoid emitting redundant materializations of integer constants
for things like null pointers, which at this level aren't
different from regular integer constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57265 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 22:03:27 +00:00
Owen Anderson
95dad830bb Add an option to enable StrongPHIElimination, for ease of testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57259 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 20:22:28 +00:00
Andrew Lenharth
2163ca11d5 Use Dan's supperior check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57255 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 18:27:23 +00:00
Andrew Lenharth
ff75d9edbb No need for |=
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 17:11:29 +00:00
Andrew Lenharth
1ad0c8201b Use ADDC if it is valid at any smaller size. Do it right this time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57248 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 17:09:16 +00:00
Andrew Lenharth
5c9cc1392c Use ADDC if it is valid at any smaller size. fixes test/Codegen/Generic/i128-addsub.ll on x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57247 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 17:03:15 +00:00
Andrew Lenharth
40d513960a Expand arith on machines without carry flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57243 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 14:15:42 +00:00
Dan Gohman
b5cc34d098 Correctly handle calls with no return values. This fixes
2006-01-23-UnionInit on x86-64 when inlining is not enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57223 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 00:12:37 +00:00
Dan Gohman
4daa9071ed Don't dereference the end() iterator. Thanks to
ENABLE_EXPENSIVE_CHECKS for finding this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57181 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 18:00:07 +00:00
Devang Patel
e4d4b8c533 Remove unncessary isDeclaration() checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57179 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 17:30:07 +00:00
Chris Lattner
d20a00d011 reorder #include order, patch by Kenneth Boyd!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57148 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 03:54:25 +00:00
Chris Lattner
78129446ca Add #include to get alloca, patch by Kenneth Boyd!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57147 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 03:53:16 +00:00
Chris Lattner
31d7161206 wrap some long lines and expand i32 mul's to libcalls, inspired by a
patch by Mikael Lepisto!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57077 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 21:27:46 +00:00
Oscar Fuentes
80533040bc CMake: Reflected changes on source file structure. New plugin support
for llvmc2 incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57076 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 21:18:50 +00:00
Argyrios Kyrtzidis
0304b87cce Fix compilation error on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57046 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 08:11:49 +00:00
Dan Gohman
241f464d24 Fix fast-isel's handling of atomic instructions. They may
expand to multiple basic blocks, in which case fast-isel
needs to informed of which block to use as it resumes
inserting instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57040 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 00:56:36 +00:00
Dan Gohman
022b21ff7c Fix a bug in the local allocator's liveness computation where it
was setting kill flags on tied uses in two-address instructions.
The kill flags were causing the allocator to think it could
allocate the use and its tied def in different registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57039 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 00:31:14 +00:00
Dale Johannesen
1b54c7fe9b Pass MemOperand through for 64-bit atomics on 32-bit,
incidentally making the case where the memop is a
pointer deref work.  Fix cmp-and-swap regression.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57027 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 19:41:08 +00:00
Dan Gohman
ca0a5d9356 Use -1ULL instead of uint64_t(-1), at Anton's suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57021 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 17:56:45 +00:00
Evan Cheng
17a82eaeb6 Fix typos pointed out by Duncan. Also untabify these files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57018 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 17:11:58 +00:00
Dan Gohman
d735b8019b Switch the MachineOperand accessors back to the short names like
isReg, etc., from isRegister, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 15:45:36 +00:00
Duncan Sands
e47561ccff The result of getSetCCResultType (eg: i32) may be larger
than the type an i1 is promoted to (eg: i8).  Account
for this.  Noticed by Tilmann Scheller on CellSPU; he
will hopefully take care of fixing this in LegalizeDAG
and adding a testcase!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56997 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 07:41:46 +00:00