Chris Lattner
0e88c6a9b4
SelectionDAG::SignBitIsZero doesn't work right for vectors,
...
for now, conservatively return false.
llvm-svn: 74969
2009-07-07 23:28:46 +00:00
Dale Johannesen
f77b78ed70
Operand of asm("call") (the callee function) is represented
...
as "X" constraint and "P" modifier on x86. Make this work.
(Change may not be sufficient to fix it for non-Darwin, but
I'm pretty sure it won't break anything.)
gcc.apple/asm-block-32.c
gcc.apple/asm-block-33.c
llvm-svn: 74967
2009-07-07 23:26:33 +00:00
Chris Lattner
e2435c4f6f
add support for legalizing an icmp where the result is illegal (4xi1) but
...
the input is legal (4 x i32)
llvm-svn: 74964
2009-07-07 23:03:54 +00:00
Chris Lattner
8604f71f91
random code cleanups.
...
llvm-svn: 74962
2009-07-07 22:49:15 +00:00
Chris Lattner
a754f344b2
implement support for spliting and scalarizing vector setcc's. This
...
finishes off enough support for vector compares to get the icmp/fcmp
version of 2008-07-23-VSetCC.ll passing.
llvm-svn: 74961
2009-07-07 22:47:46 +00:00
Chris Lattner
440ad90c83
lower vector icmp/fcmp to ICMP/FCMP nodes with the right result
...
(vector of bool).
llvm-svn: 74960
2009-07-07 22:41:32 +00:00
Chris Lattner
8361a0c867
ScalarizeVecRes_ShiftOp and ScalarizeVecRes_BinOp are the same,
...
eliminate the former.
llvm-svn: 74959
2009-07-07 22:28:41 +00:00
Chris Lattner
7e1482b246
add support for vector legalizing of *_EXTEND.
...
llvm-svn: 74957
2009-07-07 22:27:17 +00:00
Devang Patel
e416111eeb
Accidently dropped this while removing dead code in previous commit.
...
llvm-svn: 74953
2009-07-07 21:55:14 +00:00
Devang Patel
4fdc3e6c1d
Remove dead code.
...
llvm-svn: 74949
2009-07-07 21:12:32 +00:00
Owen Anderson
75f0f1cc6c
Have scoped mutexes take referenes instead of pointers.
...
llvm-svn: 74931
2009-07-07 18:33:04 +00:00
Evan Cheng
c0a72563c9
Revert 74898. It broke several tests.
...
llvm-svn: 74925
2009-07-07 17:50:43 +00:00
Sanjiv Gupta
83f715997c
if the terminator is a branch depending upon the side effects of a
...
previous cmp; a copy can not be inserted here if the copy insn also has
side effects. We don't have access to the attributes of copy insn here;
so just play safe by finding a safe locations for branch terminators.
llvm-svn: 74898
2009-07-07 08:04:51 +00:00
Evan Cheng
29ce3bfbb8
Avoid adding a duplicate def. This fixes PR4478.
...
llvm-svn: 74857
2009-07-06 21:34:05 +00:00
Duncan Sands
79c4498f99
Fix the cmake build - patch by Xerxes Rånby.
...
llvm-svn: 74825
2009-07-06 14:28:32 +00:00
Bruno Cardoso Lopes
f03970cf37
Changed ELFCodeEmitter to inherit from ObjectCodeEmitter
...
llvm-svn: 74821
2009-07-06 09:26:48 +00:00
Bruno Cardoso Lopes
fe9ea88db1
Cleanup MachO writer and code emitter. Fix 80 cols problems, remove extra spaces, shrink down includes and move some methods out-of-line
...
llvm-svn: 74817
2009-07-06 06:40:51 +00:00
Bruno Cardoso Lopes
c28df0f408
Just forgot to include the two new files
...
llvm-svn: 74814
2009-07-06 05:16:40 +00:00
Bruno Cardoso Lopes
38373542a1
Add the Object Code Emitter class. Original patch by Aaron Gray, I did some
...
cleanup, removed some #includes and moved Object Code Emitter out-of-line.
llvm-svn: 74813
2009-07-06 05:09:34 +00:00
Owen Anderson
977aa11bc6
More LLVMContext-ification.
...
llvm-svn: 74807
2009-07-05 22:41:43 +00:00
Tilmann Scheller
cea3c16aa5
Add NumFixedArgs attribute to CallSDNode which indicates the number of fixed arguments in a vararg call.
...
With the SVR4 ABI on PowerPC, vector arguments for vararg calls are passed differently depending on whether they are a fixed or a variable argument. Variable vector arguments always go into memory, fixed vector arguments are put
into vector registers. If there are no free vector registers available, fixed vector arguments are put on the stack.
The NumFixedArgs attribute allows to decide for an argument in a vararg call whether it belongs to the fixed or variable portion of the parameter list.
llvm-svn: 74764
2009-07-03 06:44:53 +00:00
Bruno Cardoso Lopes
0dc4fd3fcc
Factor some code out and support for Jump Table relocations
...
llvm-svn: 74760
2009-07-03 04:36:26 +00:00
Devang Patel
5f93a737f6
Simplify debug info intrisinc lowering.
...
llvm-svn: 74733
2009-07-02 22:43:26 +00:00
Douglas Gregor
b523a25108
CMake build fixes, from Xerxes Ranby
...
llvm-svn: 74720
2009-07-02 18:53:52 +00:00
Bruno Cardoso Lopes
810ef07890
shrinking down #includes
...
llvm-svn: 74718
2009-07-02 18:29:24 +00:00
Bruno Cardoso Lopes
bd4ae81317
Remove getFunctionAlignment from TargetELFInfo and use new MachineFunction alignment method
...
llvm-svn: 74686
2009-07-02 02:13:13 +00:00
Devang Patel
735f7d53ca
Simplify.
...
llvm-svn: 74677
2009-07-02 00:28:03 +00:00
Devang Patel
2e373cdc9f
Simplify. No intentional functionality change.
...
llvm-svn: 74673
2009-07-02 00:08:09 +00:00
Devang Patel
1fececd8c1
Refactor. No functionality change.
...
llvm-svn: 74659
2009-07-01 23:19:01 +00:00
Devang Patel
9149c185a4
llvm.dbg.declare is always used for local variable's debug info.
...
llvm-svn: 74625
2009-07-01 18:51:07 +00:00
Evan Cheng
e6989735a6
CommuteChangesDestination() should check if to-be-commuted instruction defines any register. Also teaches the default commuteInstruction() to commute instruction without definitions (e.g. X86::test / ARM::tsp).
...
llvm-svn: 74602
2009-07-01 08:29:08 +00:00
Evan Cheng
7d78cb531e
Remove special handling of implicit_def. Fix a couple more bugs in liveintervalanalysis and coalescer handling of implicit_def.
...
Note, isUndef marker must be placed even on implicit_def def operand or else the scavenger will not ignore it. This is necessary because -O0 path does not use liveintervalanalysis, it treats implicit_def just like any other def.
llvm-svn: 74601
2009-07-01 08:19:36 +00:00
Evan Cheng
37503e9671
Handle IMPLICIT_DEF with isUndef operand marker, part 2. This patch moves the code to annotate machineoperands to LiveIntervalAnalysis. It also add markers for implicit_def that define physical registers. The rest, is just a lot of details.
...
llvm-svn: 74580
2009-07-01 01:59:31 +00:00
Daniel Dunbar
bc3d149e98
Remove unused AsmPrinter OptLevel argument, and propogate.
...
- This more or less amounts to a revert of r65379. I'm curious to know what
happened that caused this variable to become unused.
llvm-svn: 74579
2009-07-01 01:48:54 +00:00
Bill Wendling
c0fb316bd3
Add an "alignment" field to the MachineFunction object. It makes more sense to
...
have the alignment be calculated up front, and have the back-ends obey whatever
alignment is decided upon.
This allows for future work that would allow for precise no-op placement and the
like.
llvm-svn: 74564
2009-06-30 22:38:32 +00:00
Evan Cheng
28b9e77f19
Temporarily restore the scavenger implicit_def checking code. MachineOperand isUndef mark is not being put on implicit_def of physical registers (created for parameter passing, etc.).
...
llvm-svn: 74519
2009-06-30 09:19:42 +00:00
Evan Cheng
c6c942b70f
Add a bit IsUndef to MachineOperand. This indicates the def / use register operand is defined by an implicit_def. That means it can def / use any register and passes (e.g. register scavenger) can feel free to ignore them.
...
The register allocator, when it allocates a register to a virtual register defined by an implicit_def, can allocate any physical register without worrying about overlapping live ranges. It should mark all of operands of the said virtual register so later passes will do the right thing.
This is not the best solution. But it should be a lot less fragile to having the scavenger try to track what is defined by implicit_def.
llvm-svn: 74518
2009-06-30 08:49:04 +00:00
Devang Patel
e35cd91347
Struct types are described using field types only.
...
llvm-svn: 74477
2009-06-29 23:46:50 +00:00
Devang Patel
bff451b95b
s/MainCU/ModuleCU/g
...
llvm-svn: 74452
2009-06-29 20:45:18 +00:00
Devang Patel
4ba8cbff55
Multiple DW_TAG_compile_unit is not used, afaict, on any target.
...
Update dwarf writer to only emit one DW_TAG_compile_unit per .o file.
llvm-svn: 74449
2009-06-29 20:38:13 +00:00
Dan Gohman
e25e17d91e
Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.
...
llvm-svn: 74394
2009-06-27 21:22:48 +00:00
Chris Lattner
0ce83b0e95
When doing remat, don't consider uses of non-allocatable physregs. Patch
...
by Evan.
llvm-svn: 74370
2009-06-27 04:06:41 +00:00
Chris Lattner
ce7f3c052e
fix a typo that GCC should have caught that causes crashes with -view-*-dags
...
llvm-svn: 74364
2009-06-27 00:57:02 +00:00
Chris Lattner
ca9aefcc93
fix a really subtle bug in the cross section of aliases and TLS:
...
the SelectionDAG::getGlobalAddress function properly looks through
aliases to determine thread-localness, but then passes the GV* down
to GlobalAddressSDNode::GlobalAddressSDNode which does not. Instead
of passing down isTarget, just pass down the predetermined node
opcode. This fixes some assertions with out of tree changes I'm
working on.
llvm-svn: 74325
2009-06-26 21:14:05 +00:00
Owen Anderson
0cf6b34d5d
Get rid of these cache variables, which are a holdover from the days when
...
we had multiple type planes and these lookups were expensive.
llvm-svn: 74319
2009-06-26 20:33:47 +00:00
Chris Lattner
0fee902c2d
implement DOTGraphTraits<SelectionDAG*>::getNodeLabel in terms of
...
SDNode::print_details to eliminate a ton of near-duplicate code.
llvm-svn: 74311
2009-06-26 19:06:10 +00:00
Douglas Gregor
6d9b0e8c19
Fix linking of llvm-ld and lli with CMake, from Xerxes Rånby
...
llvm-svn: 74285
2009-06-26 15:37:00 +00:00
Chris Lattner
05eabf4f95
dot graph viewing is apparently not using SDNode::print_details, this is bad,
...
but in the meantime lets print targetflags on node labels.
llvm-svn: 74274
2009-06-26 05:55:43 +00:00
Chris Lattner
3aef0c897e
propagate target operand flags from dag nodes into MachineOperands.
...
llvm-svn: 74273
2009-06-26 05:52:14 +00:00
Chris Lattner
181d139bc3
fit in 80 cols
...
llvm-svn: 74270
2009-06-26 05:39:02 +00:00