Daniel Dunbar
6f0c74d0b4
VMCore: Add Type::getIntN[Ptr]Ty, which are the obvious generic forms of
...
Type::getInt{1,8,...}[Ptr]Ty, so code can consistently use the methods on Type
without occasionally needed to call IntegerType::get.
llvm-svn: 101111
2010-04-13 01:39:07 +00:00
Daniel Dunbar
dbce77ee48
IRBuilder: Add Create{Shl,LShr,And,Or,Xor} methods from uin64_t and APInt constants.
...
llvm-svn: 101110
2010-04-13 01:38:57 +00:00
Chris Lattner
dabcd9738c
add llvm codegen support for -ffunction-sections and -fdata-sections,
...
patch by Sylvere Teissier!
llvm-svn: 101106
2010-04-13 00:36:43 +00:00
Dan Gohman
ff456e3f4d
Enhance ScalarEvolution::isKnownPredicate with support for
...
loop conditions which are invariants.
llvm-svn: 100995
2010-04-11 22:16:48 +00:00
Dan Gohman
a76ed3e23b
Fix a comment.
...
llvm-svn: 100992
2010-04-11 22:07:56 +00:00
Dan Gohman
25305cd2d1
Fix a #include.
...
llvm-svn: 100980
2010-04-11 19:27:52 +00:00
Dan Gohman
9ca5efece4
Rename isLoopGuardedByCond to isLoopEntryGuardedByCond, to emphasise
...
that it's only testing for the entry condition, not full loop-invariant
conditions.
llvm-svn: 100979
2010-04-11 19:27:13 +00:00
Benjamin Kramer
adc8df5270
utostr isn't going away too soon, try to make it slightly smaller.
...
llvm-svn: 100977
2010-04-11 19:00:03 +00:00
Ted Kremenek
90babe9f35
Move 'Optional' class from Clang to LLVM/ADT.
...
llvm-svn: 100889
2010-04-09 20:25:54 +00:00
Bob Wilson
ae630d5518
Fix up header comments to match the comment fixups I made in r100849.
...
llvm-svn: 100869
2010-04-09 16:24:49 +00:00
Dan Gohman
6798e98b41
Don't use reserved identifiers.
...
llvm-svn: 100838
2010-04-09 01:19:28 +00:00
Dan Gohman
127f5c53e1
Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.
...
llvm-svn: 100824
2010-04-08 23:03:40 +00:00
Chris Lattner
e154403f78
delete a forwarding function.
...
llvm-svn: 100815
2010-04-08 21:34:17 +00:00
Chris Lattner
1cf4bded13
move elf section uniquing to MCContext. Along the way
...
merge XCore's section into MCSectionELF
llvm-svn: 100812
2010-04-08 21:26:26 +00:00
Chris Lattner
0225dbbfee
remove the TargetLoweringObjectFileMachO::getMachoSection
...
api and update clients to use MCContext instead.
llvm-svn: 100808
2010-04-08 20:40:11 +00:00
Chris Lattner
60ff59e5c1
move macho section uniquing from MCParser and TLOF to MCContext where
...
the compiler and asmparser now unique to the same sections. This fixes
rdar://7835021.
llvm-svn: 100807
2010-04-08 20:30:37 +00:00
Evan Cheng
619f1b8a94
Coalescer should not delete copy instructions whose defs are partially dead. e.g.
...
%RDI<def,dead> = MOV64rr %RAX<kill>, %EDI<imp-def>
llvm-svn: 100804
2010-04-08 20:02:37 +00:00
Dan Gohman
6ad805d335
Add a -lint pass which checks for common sources of undefined or likely
...
unintended behavior.
llvm-svn: 100798
2010-04-08 18:47:09 +00:00
Dan Gohman
95038973ce
Fix a comment.
...
llvm-svn: 100783
2010-04-08 17:41:04 +00:00
Benjamin Kramer
63b5d569d1
Provide operator delete for BumpPtrAllocator and RecyclingAllocator. They will
...
never be called but msvc complains that they're missing.
llvm-svn: 100766
2010-04-08 15:22:35 +00:00
Evan Cheng
3fa0b6fb03
Avoid using f64 to lower memcpy from constant string. It's cheaper to use i32 store of immediates.
...
llvm-svn: 100751
2010-04-08 07:37:57 +00:00
Evan Cheng
176d2886e8
Fix typo.
...
llvm-svn: 100726
2010-04-07 23:51:38 +00:00
Chris Lattner
393ea6fc22
introduce a new recoverable error handling API to LLVMContext
...
and use it in one place in inline asm handling stuff. Before
we'd generate this for an invalid modifier letter:
$ clang asm.c -c -o t.o
fatal error: error in backend: Invalid operand found in inline asm: 'abc incl ${0:Z}'
INLINEASM <es:abc incl ${0:Z}>, 10, %EAX<def>, 2147483657, %EAX, 14, %EFLAGS<earlyclobber,def,dead>, <!-1>
Now we generate this:
$ clang asm.c -c -o t.o
error: invalid operand in inline asm: 'incl ${0:Z}'
asm.c:3:12: note: generated from here
__asm__ ("incl %Z0" : "+r" (X));
^
1 error generated.
This is much better but still admittedly not great ("why" is the operand
invalid??), codegen should try harder with its diagnostics :)
llvm-svn: 100723
2010-04-07 23:40:44 +00:00
Chris Lattner
ea8b374616
rename llvm_install_error_handler -> install_fatal_error_handler
...
and friends.
llvm-svn: 100717
2010-04-07 23:12:29 +00:00
Eric Christopher
70a6c8fd6d
Add support for stpncpy_chk.
...
llvm-svn: 100710
2010-04-07 23:00:07 +00:00
Chris Lattner
80b41881bc
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
0768c834fe
remove some unneeded errorhandling stuff.
...
llvm-svn: 100703
2010-04-07 22:44:07 +00:00
Chris Lattner
f927d33d8c
minor tidying up
...
llvm-svn: 100702
2010-04-07 22:41:29 +00:00
Dan Gohman
b5210c934f
Generalize IVUsers to track arbitrary expressions rather than expressions
...
explicitly split into stride-and-offset pairs. Also, add the
ability to track multiple post-increment loops on the same expression.
This refines the concept of "normalizing" SCEV expressions used for
to post-increment uses, and introduces a dedicated utility routine for
normalizing and denormalizing expressions.
This fixes the expansion of expressions which are post-increment users
of more than one loop at a time. More broadly, this takes LSR another
step closer to being able to reason about more than one loop at a time.
llvm-svn: 100699
2010-04-07 22:27:08 +00:00
Anton Korobeynikov
e5c1563130
Remove late ARM codegen optimization pass committed by accident.
...
It is not ready for public yet.
llvm-svn: 100673
2010-04-07 18:23:27 +00:00
Anton Korobeynikov
0401f43ddc
Since tblgen bug was fixed (thanks Jakob!) we don't need InstrStage2 hack anymore.
...
llvm-svn: 100667
2010-04-07 18:21:41 +00:00
Anton Korobeynikov
b68aa8b5ab
Make use of new reserved/required scheduling stuff: introduce VFP and NEON locks to model domain cross stalls precisly.
...
llvm-svn: 100646
2010-04-07 18:19:40 +00:00
Anton Korobeynikov
f93145e685
Initial support for different kinds of FU reservation.
...
llvm-svn: 100645
2010-04-07 18:19:32 +00:00
Anton Korobeynikov
d873a16430
Add hook to insert late LLVM=>LLVM passes just before isel
...
llvm-svn: 100640
2010-04-07 18:18:42 +00:00
Chris Lattner
dde7376e9d
Three changes:
...
1. Introduce some enums and accessors in the InlineAsm class
that eliminate a ton of magic numbers when handling inline
asm SDNode.
2. Add a new MDNodeSDNode selection dag node type that holds
a MDNode (shocking!)
3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc
metadata, propagating it to the instruction emitter, which
drops it.
No functionality change.
llvm-svn: 100605
2010-04-07 05:20:54 +00:00
Evan Cheng
ac90d47ea3
Post regalloc LICM. Work in progress.
...
llvm-svn: 100592
2010-04-07 00:41:17 +00:00
Bill Wendling
c1bbfced8f
Make this hack more specific to the Apple gcc 4.2 non-LLVM compiler.
...
llvm-svn: 100556
2010-04-06 20:07:21 +00:00
Chris Lattner
81177fa767
this accessor doesn't need to copy the string.
...
llvm-svn: 100542
2010-04-06 18:37:22 +00:00
Chris Lattner
c83a42075b
enhance SMDiagnostic to also maintain a pointer to the SourceMgr.
...
Add a simplified constructor for clients that don't have locations
like "file not found" errors.
llvm-svn: 100538
2010-04-06 18:06:18 +00:00
Jakob Stoklund Olesen
37cb8c0742
Avoid overflowing a signed integer which triggers undefined behaviour.
...
Overflowing an unsigned integer is fine and behaves as you would expect.
Also fix a pasto, allowing SignExtend64 to take a 64-bit argument.
llvm-svn: 100517
2010-04-06 03:12:43 +00:00
Chris Lattner
960095d2c8
propagate cookie management out one layer of function calls.
...
llvm-svn: 100510
2010-04-06 00:58:50 +00:00
Chris Lattner
8c1f45d90b
Give MachineModuleInfo an actual Module*.
...
llvm-svn: 100508
2010-04-06 00:51:52 +00:00
Chris Lattner
b7a7cb37b6
give LLVMContext an inline asm diagnostic hook member.
...
llvm-svn: 100506
2010-04-06 00:44:45 +00:00
Chris Lattner
48d30a3011
give the SourceMgr object a cookie.
...
llvm-svn: 100504
2010-04-06 00:33:43 +00:00
Chris Lattner
117d05ca0e
Give llvm::SourceMgr the ability to have a client-specified
...
diagnostic handler.
llvm-svn: 100503
2010-04-06 00:26:48 +00:00
Douglas Gregor
41de3d792a
Remove MaybeOwningPtr. We're going to use reference-counting instead.
...
llvm-svn: 100499
2010-04-05 23:53:46 +00:00
Chris Lattner
f753452587
Give AsmParser an option to control whether it finalizes
...
the stream. New demo:
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
000000000000000b movl %eax,(%rsp)
000000000000000e movl %eax,0x04(%rsp)
0000000000000012 addq $0x08,%rsp
0000000000000016 ret
llvm-svn: 100492
2010-04-05 23:15:42 +00:00
Chris Lattner
c1d1549692
add a comment.
...
llvm-svn: 100490
2010-04-05 23:07:42 +00:00
Chris Lattner
269737461d
stringref-ize the MemoryBuffer::get apis. This requires
...
a co-committed clang patch.
llvm-svn: 100485
2010-04-05 22:42:30 +00:00
Douglas Gregor
394c3bc02e
Introduce MaybeOwningPtr, a smart pointer that may (or may not) have
...
ownership over the pointer it contains. Useful when we want to
communicate ownership while still having several clients holding on to
the same pointer *without* introducing reference counting.
llvm-svn: 100463
2010-04-05 21:09:22 +00:00