Chris Lattner
4d97e42ba6
enhance bits_storage to work with enums by using a c-style
...
cast instead of reinterpret_cast, fixing PR6243. Apparently
reinterpret_cast and I aren't getting along today.
llvm-svn: 95622
2010-02-09 00:05:45 +00:00
Dan Gohman
30845777be
Document that MCExpr::Mod is actually remainder.
...
Document that MCExpr::Div, Mod, and the comparison operators are all
signed operators.
Document that the comparison operators' results are target-dependent.
Document that the behavior of shr is target-dependent.
llvm-svn: 95619
2010-02-08 23:58:47 +00:00
Chris Lattner
32fa6adff6
now that @GOTOFF is no longer represented as a suffix on a
...
MCSymbol, we can remove the 'suffix' argument of
GetBlockAddressSymbol. Do so.
llvm-svn: 95601
2010-02-08 23:10:08 +00:00
Chris Lattner
39d41535ad
don't make hte dtor private or we can't construct the class.
...
llvm-svn: 95587
2010-02-08 22:07:36 +00:00
Chris Lattner
da4372a3c2
use a c-style cast instead of reinterpret-cast, as sometimes the
...
cast needs to adjust for a vtable pointer when going from base to
derived type (when the base doesn't have a vtable but the
derived type does).
llvm-svn: 95585
2010-02-08 22:05:38 +00:00
Dan Gohman
30a32bc593
Add const qualifiers.
...
llvm-svn: 95582
2010-02-08 22:00:06 +00:00
Dan Gohman
f45b7c6795
Rename the PerformTailCallOpt variable to GuaranteedTailCallOpt to reflect
...
its current purpose.
llvm-svn: 95564
2010-02-08 20:27:50 +00:00
Chris Lattner
b3fe7597f5
add scaffolding for target-specific MCExprs.
...
llvm-svn: 95559
2010-02-08 19:41:07 +00:00
Duncan Sands
983b171d40
Flesh out the list of predicates, for those who like this style. I was
...
looking for isPointer, and added the rest for uniformity.
llvm-svn: 95557
2010-02-08 19:36:51 +00:00
Daniel Dunbar
e56fb57d08
ImmutableIntervalMap: Fix for unqualified lookup into dependent base class, done
...
by clang's -fixit! :)
llvm-svn: 95551
2010-02-08 18:08:46 +00:00
Dale Johannesen
05cffb66ae
Add a Debug bit to MachineOperand, for uses that
...
are from debug info. Add an iterator to MachineRegisterInfo
to skip Debug operands when walking the use list. No
functional change yet.
llvm-svn: 95473
2010-02-06 02:28:32 +00:00
Jakob Stoklund Olesen
83ebc265b3
Reintroduce the InlineHint function attribute.
...
This time it's for real! I am going to hook this up in the frontends as well.
The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.
We need some experiments to determine if that is the right thing to do.
llvm-svn: 95466
2010-02-06 01:16:28 +00:00
Devang Patel
102b8a3103
Set DW_AT_artificial only if argument is marked as artificial.
...
llvm-svn: 95461
2010-02-06 01:02:37 +00:00
Jakob Stoklund Olesen
039cd8ab3a
Update CodeMetrics to count 'big' function calls explicitly.
...
llvm-svn: 95453
2010-02-05 23:21:18 +00:00
Jakob Stoklund Olesen
670458b3be
Teach SimplifyCFG about magic pointer constants.
...
Weird code sometimes uses pointer constants other than null. This patch
teaches SimplifyCFG to build switch instructions in those cases.
Code like this:
void f(const char *x) {
if (!x)
puts("null");
else if ((uintptr_t)x == 1)
puts("one");
else if (x == (char*)2 || x == (char*)3)
puts("two");
else if ((intptr_t)x == 4)
puts("four");
else
puts(x);
}
Now becomes a switch:
define void @f(i8* %x) nounwind ssp {
entry:
%magicptr23 = ptrtoint i8* %x to i64 ; <i64> [#uses=1]
switch i64 %magicptr23, label %if.else16 [
i64 0, label %if.then
i64 1, label %if.then2
i64 2, label %if.then9
i64 3, label %if.then9
i64 4, label %if.then14
]
Note that LLVM's own DenseMap uses magic pointers.
llvm-svn: 95439
2010-02-05 22:03:18 +00:00
Jeffrey Yasskin
1604115c5a
Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.
...
llc.cpp also defined these flags, meaning that when I linked all of LLVM's
libraries into a single shared library, llc crashed on startup with duplicate
flag definitions. This patch passes them through the EngineBuilder into
JIT::selectTarget().
llvm-svn: 95390
2010-02-05 16:19:36 +00:00
Daniel Dunbar
96bc973155
MC: Change default comment column to 40 characters.
...
llvm-svn: 95378
2010-02-05 07:32:18 +00:00
Evan Phoenix
a44be8b7f3
Disable external stubs for X86-32 and X86-64
...
Instruction selection for X86 now can choose an instruction
sequence that will fit any address of any symbol, no matter
the pointer width. X86-64 uses a mov+call-via-reg sequence
for this.
llvm-svn: 95323
2010-02-04 19:56:59 +00:00
Chris Lattner
e43007d443
add support for the sparcv9-*-* target triple to turn on
...
64-bit sparc codegen. Patch by Nathan Keynes!
llvm-svn: 95293
2010-02-04 06:34:01 +00:00
Dan Gohman
be6cf8cfb0
Change the argument to getIntegerSCEV to be an int64_t, rather
...
than int. This will make it more convenient for LSR, which does
a lot of things with int64_t offsets.
llvm-svn: 95281
2010-02-04 02:43:51 +00:00
Devang Patel
83d905f82b
Provide interface to identifiy artificial methods.
...
llvm-svn: 95240
2010-02-03 19:57:19 +00:00
Jeffrey Yasskin
92abe5abcc
r94686 changed all ModuleProvider parameters to Modules, which made the
...
1-argument ExecutionEngine::create(Module*) ambiguous with the signature that
used to be ExecutionEngine::create(ModuleProvider*, defaulted_params). Fixed
by removing the 1-argument create(). Fixes PR6221.
llvm-svn: 95236
2010-02-03 19:18:04 +00:00
Daniel Dunbar
d997cd69cd
llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
...
output.
llvm-svn: 95227
2010-02-03 18:18:30 +00:00
Zhongxing Xu
bbb98cd401
Remove redundant declaration.
...
llvm-svn: 95213
2010-02-03 09:05:21 +00:00
Zhongxing Xu
07020ea237
Add constructors.
...
llvm-svn: 95212
2010-02-03 09:04:11 +00:00
Chris Lattner
837d242070
make MachineModuleInfoMachO hold non-const MCSymbol*'s instead
...
of const ones. non-const ones aren't very useful, because you can't
even, say, emit them.
llvm-svn: 95205
2010-02-03 06:18:30 +00:00
Chris Lattner
e8811c3222
change addPassesToEmitFile to return true on failure instead of its input,
...
add -filetype=null for performance testing and remove -filetype=dynlib,
which isn't planned to be implemented.
llvm-svn: 95202
2010-02-03 05:55:08 +00:00
Jeffrey Yasskin
853eeb0db1
Reconfigure with autoconf-2.60, and fix autoconf.ac to work with that version.
...
llvm-svn: 95191
2010-02-03 02:11:49 +00:00
Chris Lattner
a64be6d665
privatize a bunch of methods and move \n printing into them.
...
llvm-svn: 95186
2010-02-03 01:46:05 +00:00
Chris Lattner
78f57ac8dc
Hook up -filetype=obj through the MachO streamer. Here's a demo:
...
$ cat t.ll
@g = global i32 42
$ llc t.ll -o t.o -filetype=obj
$ nm t.o
00000000 D _g
There is still a ton of work left. Instructions are not being encoded
yet apparently.
llvm-svn: 95162
2010-02-02 23:57:42 +00:00
Evan Cheng
9057fea7ef
Revert 95130.
...
llvm-svn: 95160
2010-02-02 23:55:14 +00:00
Chris Lattner
643f2f9bc4
refactor code so that LLVMTargetMachine creates the asmstreamer and
...
mccontext instead of having AsmPrinter do it. This allows other
types of MCStreamer's to be passed in.
llvm-svn: 95155
2010-02-02 23:37:42 +00:00
Chris Lattner
7dd4ad3ced
Remove a bunch of stuff around the edges of the ELF writer.
...
Now the only use of the ELF writer is the JIT, which won't be
easy to fix in the short term. :( :(
llvm-svn: 95148
2010-02-02 22:31:11 +00:00
Daniel Dunbar
eb0b81040a
MC/Mach-O: Set SOME_INSTRUCTIONS bit for sections.
...
llvm-svn: 95135
2010-02-02 21:44:01 +00:00
Chris Lattner
21bcba21e7
eliminate all the dead addSimpleCodeEmitter implementations.
...
eliminate random "code emitter" stuff in Alpha, except for
the JIT path. Next up, remove the template cruft.
llvm-svn: 95131
2010-02-02 21:31:47 +00:00
Evan Cheng
48375fbf4f
Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.
...
llvm-svn: 95130
2010-02-02 21:29:10 +00:00
Dan Gohman
612cbcdc1a
Make DenseSet's erase pass on the return value rather than swallowing it.
...
llvm-svn: 95127
2010-02-02 21:11:22 +00:00
Dan Gohman
c4096b6671
Fix function names in comments. Thanks Duncan!
...
llvm-svn: 95126
2010-02-02 21:10:27 +00:00
Chris Lattner
7d162688a9
eliminate FileModel::Model, just use CodeGenFileType. The client
...
of the code generator shouldn't care what object format a target
uses.
llvm-svn: 95124
2010-02-02 21:06:45 +00:00
Chris Lattner
cb4d0d0df4
remove the remnants of TargetMachOWriterInfo.
...
llvm-svn: 95114
2010-02-02 19:41:23 +00:00
Chris Lattner
3cae149179
Add a new top-level MachO.h file for manifest constants, fixing
...
a layering violation from MC -> Target.
llvm-svn: 95113
2010-02-02 19:38:14 +00:00
Chris Lattner
ff8ba8fc79
eliminate all forms of addPassesToEmitMachineCode except
...
the one used by the JIT. Remove all forms of
addPassesToEmitFileFinish except the one used by the static
code generator. Inline the remaining version of
addPassesToEmitFileFinish into its only caller.
llvm-svn: 95109
2010-02-02 19:14:27 +00:00
Chris Lattner
fa04a6e968
Inline addAssemblyEmitter into its one real caller and delete
...
the -print-emitted-asm option. The JIT shouldn't have to pull
in the asmprinter.
llvm-svn: 95100
2010-02-02 18:44:12 +00:00
Duncan Sands
364e9510fb
Adding missing methods for creating Add, Mul, Neg and Sub with NUW.
...
llvm-svn: 95086
2010-02-02 12:53:04 +00:00
Zhongxing Xu
2f90f25c13
Return value on every path.
...
llvm-svn: 95075
2010-02-02 07:05:31 +00:00
Zhongxing Xu
c41eb88823
simplify code.
...
llvm-svn: 95074
2010-02-02 06:33:32 +00:00
Zhongxing Xu
107fc8962f
More logic correction: RemoveOverlap should always create new tree. Add a
...
parameter to record whether changes actually happened.
llvm-svn: 95073
2010-02-02 06:22:08 +00:00
Zhongxing Xu
7c9608096b
Add a lookup method to the IntervalMap. The difference from the original
...
lookup is that if the lookup key is contained in the key, we return the data.
llvm-svn: 95070
2010-02-02 05:23:23 +00:00
Zhongxing Xu
007e05dce7
Fix a bunch of errors in the old logic.
...
llvm-svn: 95056
2010-02-02 02:40:56 +00:00
Zhongxing Xu
fa062ef731
11.8p1: A nested class is a member and as such has the same access rights as
...
any other member.
llvm-svn: 95047
2010-02-02 01:57:01 +00:00