Duncan Sands
7414cc131b
When turning a call to a bitcast function into a direct call,
...
if this becomes a varargs call then deal correctly with any
parameter attributes on the newly vararg call arguments.
llvm-svn: 45931
2008-01-13 08:02:44 +00:00
Chris Lattner
a20247cd7b
new testcase for rdar://5685492
...
llvm-svn: 45918
2008-01-13 00:19:57 +00:00
Chris Lattner
7fa87a190a
improve cygwin compatibility, patch by Sam Bishop
...
llvm-svn: 45917
2008-01-12 22:54:07 +00:00
Chris Lattner
8b29caac2c
clarify a note
...
llvm-svn: 45914
2008-01-12 18:58:46 +00:00
Evan Cheng
a5183224b0
Add hasByValArgument() to test if a call instruction has byval argument(s).
...
llvm-svn: 45913
2008-01-12 18:57:32 +00:00
Chris Lattner
d90840eddc
we don't have to make an explicit copy of a byval argument when
...
inlining a function if we know that the function does not write
to *any* memory. This implements test/Transforms/Inline/byval2.ll
llvm-svn: 45912
2008-01-12 18:54:29 +00:00
Evan Cheng
1e7cbf32c2
Indirect call with byval parameter requires a cast first.
...
llvm-svn: 45911
2008-01-12 18:53:07 +00:00
Duncan Sands
3b617cbe30
Be more liberal in what parameter attributes are
...
allowed on the vararg arguments of a call.
llvm-svn: 45909
2008-01-12 16:42:01 +00:00
Chris Lattner
fb5876f0be
Allow clients to specify the inline threshold when creating
...
the inliner pass. Patch by Robert Zeh.
llvm-svn: 45903
2008-01-12 06:49:13 +00:00
Chris Lattner
e1bd3e1e72
Add support for NetBSD, patch by Krister Walfridsson!
...
llvm-svn: 45902
2008-01-12 06:46:09 +00:00
Evan Cheng
01ee195d38
Add -disable-lto optimization.
...
llvm-svn: 45900
2008-01-12 04:27:18 +00:00
Chris Lattner
c23b7b79fa
this actually does pass with 4.0
...
llvm-svn: 45899
2008-01-12 01:45:22 +00:00
Evan Cheng
08584fc86a
Code clean up.
...
llvm-svn: 45898
2008-01-12 01:08:07 +00:00
Evan Cheng
2e84453e5b
ByVal arguments are passed on stack. Make sure to allocate a slot using size and alignment information on the parameter attribute.
...
llvm-svn: 45897
2008-01-12 01:07:41 +00:00
Chris Lattner
5e112f44c8
fix a wordo that gordon noticed :)
...
llvm-svn: 45896
2008-01-12 00:53:16 +00:00
Chris Lattner
0242c393d1
Any x86 instruction that reads from an invariant location is invariant.
...
This allows us to sink things like:
cvtsi2sd 32(%esp), %xmm1
when reading from the argument area, for example.
llvm-svn: 45895
2008-01-12 00:35:08 +00:00
Chris Lattner
efa13b2edd
implement support for sinking a load out the bottom of a block that
...
has no stores between the load and the end of block. This works
great and sinks hundreds of stores, but we can't turn it on because
machineinstrs don't have volatility information and we don't want to
sink volatile stores :(
llvm-svn: 45894
2008-01-12 00:17:41 +00:00
Chris Lattner
433aca5066
remove some incorrect classof's.
...
llvm-svn: 45893
2008-01-11 23:25:16 +00:00
Duncan Sands
6f49217a5e
When DAE drops the varargs part of a function, ensure any
...
attributes on the vararg call arguments are also dropped.
llvm-svn: 45892
2008-01-11 23:13:45 +00:00
Evan Cheng
438d36bf7d
More cbe byval fixes.
...
llvm-svn: 45891
2008-01-11 23:10:11 +00:00
Chris Lattner
3cc116abce
llvm-g++ 4.0 has completely different code for this warning,
...
just xfail it.
llvm-svn: 45890
2008-01-11 23:06:56 +00:00
Chris Lattner
e330f0fe21
new testcase
...
llvm-svn: 45888
2008-01-11 23:04:14 +00:00
Duncan Sands
e55a5806ac
Do not allow attributes beyond a function's last
...
parameter, even if it is a varargs function. Do
allow attributes on the varargs part of a call,
but not beyond the last argument. Only allow
selected attributes to be on the varargs part of
a call (currently only 'byval' is allowed). The
reasoning here is that most attributes, eg inreg,
simply make no sense here.
llvm-svn: 45887
2008-01-11 22:36:48 +00:00
Chris Lattner
a1246ba8ed
Teach argpromote to ruthlessly hack small byval structs when it can
...
get away with it, which exposes opportunities to eliminate the memory
objects entirely. For example, we now compile byval.ll to:
define internal void @f1(i32 %b.0, i64 %b.1) {
entry:
%tmp2 = add i32 %b.0, 1 ; <i32> [#uses=0]
ret void
}
define i32 @main() nounwind {
entry:
call void @f1( i32 1, i64 2 )
ret i32 0
}
This seems like it would trigger a lot for code that passes around small
structs (e.g. SDOperand's or _Complex)...
llvm-svn: 45886
2008-01-11 22:31:41 +00:00
Duncan Sands
41029353f9
Two occurrences on one line count as one...
...
llvm-svn: 45885
2008-01-11 21:46:24 +00:00
Duncan Sands
d99973b822
If there are attributes on the varargs part of a
...
call, don't discard them.
llvm-svn: 45884
2008-01-11 21:23:39 +00:00
Scott Michel
5afa19350b
More CellSPU refinements:
...
- struct_2.ll: Completely unaligned load/store testing
- call_indirect.ll, struct_1.ll: Add test lines to exercise
X-form [$reg($reg)] addressing
At this point, loads and stores should be under control (he says
in an optimistic tone of voice.)
llvm-svn: 45882
2008-01-11 21:01:19 +00:00
Dale Johannesen
8ca78844b0
Disable for now.
...
llvm-svn: 45881
2008-01-11 20:47:33 +00:00
Chris Lattner
8644bdca87
Use smallptrset instead of std::set for efficiency.
...
llvm-svn: 45878
2008-01-11 19:36:30 +00:00
Chris Lattner
44aaf42d14
a byval argument is guaranteed to be valid to load.
...
llvm-svn: 45877
2008-01-11 19:34:32 +00:00
Chris Lattner
129a0e4f7d
Update this code to use eraseFromParent where possible. Compute
...
whether an argument is byval and pass into isSafeToPromoteArgument.
llvm-svn: 45876
2008-01-11 19:20:39 +00:00
Chris Lattner
85a0b511cc
replace a loop with a constant time check.
...
llvm-svn: 45875
2008-01-11 18:55:10 +00:00
Chris Lattner
c9666b967f
another minor datastructure tweak.
...
llvm-svn: 45874
2008-01-11 18:47:45 +00:00
Chris Lattner
a6b0783f14
start using smallvector to avoid vector heap thrashing.
...
llvm-svn: 45873
2008-01-11 18:43:58 +00:00
Chris Lattner
89d996afce
add operator==/!= to smallvector.
...
llvm-svn: 45872
2008-01-11 18:42:02 +00:00
Chris Lattner
0293fca6d8
rename MachineInstr::setInstrDescriptor -> setDesc
...
llvm-svn: 45871
2008-01-11 18:10:50 +00:00
Chris Lattner
a83f66d1bb
remove xchg and shift-reg-by-1 instructions, which are dead.
...
llvm-svn: 45870
2008-01-11 18:00:50 +00:00
Chris Lattner
73e9c2c12d
add a note, remove a done deed.
...
llvm-svn: 45869
2008-01-11 18:00:13 +00:00
Arnold Schwaighofer
5cc460a50e
hrm - correct spelling.
...
Actually were not riding any arguments. Sadly there is no semantic spell checker that is going to safe you from such a mistake.
llvm-svn: 45868
2008-01-11 17:10:15 +00:00
Arnold Schwaighofer
d58f91f376
Improve tail call optimized call's argument lowering. Before this
...
commit all arguments where moved to the stack slot where they would
reside on a normal function call before the lowering to the tail call
stack slot. This was done to prevent arguments overwriting each other.
Now only arguments sourcing from a FORMAL_ARGUMENTS node or a
CopyFromReg node with virtual register (could also be a caller's
argument) are lowered indirectly.
--This line, and those below, will be ignored--
M X86/X86ISelLowering.cpp
M X86/README.txt
llvm-svn: 45867
2008-01-11 16:49:42 +00:00
Arnold Schwaighofer
d2318e2f41
Correct a copy and paste error.
...
llvm-svn: 45865
2008-01-11 14:34:56 +00:00
Evan Cheng
ae6d80dead
Some C backend ByVal parameter attribute support. Not yet complete.
...
llvm-svn: 45864
2008-01-11 09:12:49 +00:00
Evan Cheng
b10a30578e
Rename Int_CVTSI642SSr* to Int_CVTSI2SS64r* for naming consistency and remove unused instructions.
...
llvm-svn: 45861
2008-01-11 07:37:44 +00:00
Chris Lattner
20d1e419b3
more flags set right
...
llvm-svn: 45860
2008-01-11 07:18:17 +00:00
Chris Lattner
cb62477ec2
add some missing flags.
...
llvm-svn: 45859
2008-01-11 06:59:07 +00:00
Chris Lattner
ff7707de37
don't include loopinfo.h from this file.
...
llvm-svn: 45858
2008-01-11 06:30:04 +00:00
Chris Lattner
201be5f41e
Move typedef of loop to top of the file where it is more obvious.
...
llvm-svn: 45857
2008-01-11 06:29:42 +00:00
Chris Lattner
b9232a8374
Fix 80 col violations
...
llvm-svn: 45856
2008-01-11 06:27:42 +00:00
Chris Lattner
6fa8e434a3
document the byval parameter attribute.
...
llvm-svn: 45855
2008-01-11 06:20:47 +00:00
Chris Lattner
08a33a998a
add some notes.
...
llvm-svn: 45854
2008-01-11 06:17:47 +00:00