Chris Lattner
4f6c81ac68
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
f755ff7be3
Indirect call with byval parameter requires a cast first.
...
llvm-svn: 45911
2008-01-12 18:53:07 +00:00
Chris Lattner
317e6ba07f
Tighten up handling of __func__ and friends: it should be an array
...
of const char, and it should error if it occurs outside a function.
Is it valid in an objc method? If so we should handle that too.
llvm-svn: 45910
2008-01-12 18:39:25 +00:00
Duncan Sands
0009c44464
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
a81a0279cc
Fix the type of predefined identifiers like __func__. Patch by
...
Eli Friedman!
llvm-svn: 45906
2008-01-12 08:14:25 +00:00
Chris Lattner
65531e8fb7
Fix a fixme, by only parsing extern "C" in C++ mode.
...
llvm-svn: 45905
2008-01-12 07:08:43 +00:00
Chris Lattner
38376f1595
Add first pieces of support for parsing and representing
...
extern "C" in C++ mode. Patch by Mike Stump!
llvm-svn: 45904
2008-01-12 07:05:38 +00:00
Chris Lattner
22ad7abdfe
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
459dc52df4
Add support for NetBSD, patch by Krister Walfridsson!
...
llvm-svn: 45902
2008-01-12 06:46:09 +00:00
Chris Lattner
177977ac19
When forming the squigly underline for a diagnostic, make sure to
...
verify that the source range corresponds to the current file, not
just the current line. This allows us to emit:
a.c:1:44: error: invalid operands to binary expression ('double' and 'int *')
double a; int *b; void f(void) { int c = a +
~ ^
instead of:
a.c:1:44: error: invalid operands to binary expression ('double' and 'int *')
double a; int *b; void f(void) { int c = a +
~ ~ ^
for PR1906 (note the leading ~).
Thanks to Neil for noticing this.
llvm-svn: 45901
2008-01-12 06:43:35 +00:00
Evan Cheng
0395fd76cf
Add -disable-lto optimization.
...
llvm-svn: 45900
2008-01-12 04:27:18 +00:00
Chris Lattner
ca2af72c7b
this actually does pass with 4.0
...
llvm-svn: 45899
2008-01-12 01:45:22 +00:00
Evan Cheng
7411b510b2
Code clean up.
...
llvm-svn: 45898
2008-01-12 01:08:07 +00:00
Evan Cheng
02e78103ab
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
18df33d0c8
fix a wordo that gordon noticed :)
...
llvm-svn: 45896
2008-01-12 00:53:16 +00:00
Chris Lattner
6da61c2515
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
08af5a9dad
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
1f503ddab5
remove some incorrect classof's.
...
llvm-svn: 45893
2008-01-11 23:25:16 +00:00
Duncan Sands
5b721fc21d
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
b51d228e79
More cbe byval fixes.
...
llvm-svn: 45891
2008-01-11 23:10:11 +00:00
Chris Lattner
5a3deb99b3
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
031f5e1b8c
new testcase
...
llvm-svn: 45888
2008-01-11 23:04:14 +00:00
Duncan Sands
b99f44aa5e
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
b5bd924e83
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
0ebaf91f48
Two occurrences on one line count as one...
...
llvm-svn: 45885
2008-01-11 21:46:24 +00:00
Duncan Sands
7e46c50c6a
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
a8f67e04bd
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
04b99780cf
Disable for now.
...
llvm-svn: 45881
2008-01-11 20:47:33 +00:00
Ted Kremenek
8d71e25590
Fix misspelling of "existent".
...
Do not use std::cerr; use llvm::cerr instead.
Patch provided by Sam Bishop!
llvm-svn: 45880
2008-01-11 20:42:05 +00:00
Chris Lattner
b66fbdde42
Use smallptrset instead of std::set for efficiency.
...
llvm-svn: 45878
2008-01-11 19:36:30 +00:00
Chris Lattner
4a70261f00
a byval argument is guaranteed to be valid to load.
...
llvm-svn: 45877
2008-01-11 19:34:32 +00:00
Chris Lattner
4062a625e5
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
e736e55d3c
replace a loop with a constant time check.
...
llvm-svn: 45875
2008-01-11 18:55:10 +00:00
Chris Lattner
669e7054ca
another minor datastructure tweak.
...
llvm-svn: 45874
2008-01-11 18:47:45 +00:00
Chris Lattner
a8ba28f6e4
start using smallvector to avoid vector heap thrashing.
...
llvm-svn: 45873
2008-01-11 18:43:58 +00:00
Chris Lattner
c70ed4ba5b
add operator==/!= to smallvector.
...
llvm-svn: 45872
2008-01-11 18:42:02 +00:00
Chris Lattner
596875118c
rename MachineInstr::setInstrDescriptor -> setDesc
...
llvm-svn: 45871
2008-01-11 18:10:50 +00:00
Chris Lattner
806dd0e2ac
remove xchg and shift-reg-by-1 instructions, which are dead.
...
llvm-svn: 45870
2008-01-11 18:00:50 +00:00
Chris Lattner
ff5998e66b
add a note, remove a done deed.
...
llvm-svn: 45869
2008-01-11 18:00:13 +00:00
Arnold Schwaighofer
06da9e2d43
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
6cf72fbbaf
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
Ted Kremenek
5906b9e79a
Added ProgramPoint.cpp, which implements several methods of the subclasses
...
of ProgramPoint.
llvm-svn: 45866
2008-01-11 16:36:20 +00:00
Arnold Schwaighofer
bf1816ea7b
Correct a copy and paste error.
...
llvm-svn: 45865
2008-01-11 14:34:56 +00:00
Evan Cheng
ef5285ef88
Some C backend ByVal parameter attribute support. Not yet complete.
...
llvm-svn: 45864
2008-01-11 09:12:49 +00:00
Evan Cheng
8c51394e01
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
9283173061
more flags set right
...
llvm-svn: 45860
2008-01-11 07:18:17 +00:00
Chris Lattner
f4b0c99d63
add some missing flags.
...
llvm-svn: 45859
2008-01-11 06:59:07 +00:00
Chris Lattner
6d7cf509d1
don't include loopinfo.h from this file.
...
llvm-svn: 45858
2008-01-11 06:30:04 +00:00
Chris Lattner
b3220147d2
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
b97b83fbf7
Fix 80 col violations
...
llvm-svn: 45856
2008-01-11 06:27:42 +00:00