Commit Graph

50223 Commits

Author SHA1 Message Date
Dan Gohman a3be3d7a89 llvm-gcc now emits inbounds for this getelementptr.
llvm-svn: 78758
2009-08-12 00:35:55 +00:00
Dan Gohman 76733748e1 Simplify this code, and use an in-bounds GEP.
llvm-svn: 78755
2009-08-12 00:32:55 +00:00
Oscar Fuentes e93b54be8d CMake: target triple for MSVC on Windows 64.
llvm-svn: 78753
2009-08-12 00:04:12 +00:00
Daniel Dunbar 3fb754af06 llvm-mc/AsmParser: Match hard coded registers (e.g. 'shldl %cl, %eax, %eax')
We now match all of 403.gcc (as emitted by clang). :)

llvm-svn: 78750
2009-08-11 23:23:44 +00:00
Chris Lattner 2b083cf989 prune #include
llvm-svn: 78749
2009-08-11 23:07:27 +00:00
Chris Lattner b9c1d6c86e prune #includage.
llvm-svn: 78748
2009-08-11 23:06:16 +00:00
Chris Lattner 96db1abb77 fix CodeGen/PowerPC/2007-01-15-AsmDialect.ll, fallout from r78742
llvm-svn: 78747
2009-08-11 23:03:40 +00:00
Chris Lattner 1e9097e36a change the -x86-asm-syntax=intel/att flag to be in X86TAI
instead of X86 Subtarget.  This elimianates dependencies on
X86Subtarget from X86TAI.

llvm-svn: 78746
2009-08-11 23:01:09 +00:00
Evan Cheng f6a9d06241 Shrinkify Thumb2 r = add sp, imm.
llvm-svn: 78745
2009-08-11 23:00:31 +00:00
Chris Lattner 97868fe1b9 second half of commit.
llvm-svn: 78744
2009-08-11 22:52:15 +00:00
Chris Lattner 63d5be8a7b pass "is64Bit" flag into PPC TAI ctors instead of a whole targetmachine.
llvm-svn: 78743
2009-08-11 22:51:34 +00:00
Chris Lattner e655521a28 eliminate asmflavor from subtarget, PPCTAI is the only client
and each callee knows that it returns.

llvm-svn: 78742
2009-08-11 22:49:34 +00:00
Chris Lattner abdcbc7ef2 Change the asmprinter to print the comment character before the
"inlineasmstart/end" strings so that the contents of the directive
are separate from the comment character.  This lets elf targets
get #APP/#NOAPP for free even if they don't use "#" as the comment
character.  This also allows hoisting the darwin stuff up to the
shared TAI class.

llvm-svn: 78737
2009-08-11 22:39:40 +00:00
David Goodwin fd5defed1d Allow a zero cycle stage to reserve/require a FU without advancing the cycle counter.
llvm-svn: 78736
2009-08-11 22:38:43 +00:00
Chris Lattner 54075a78b4 factorize more darwin TAI stuff. Note that this gives
darwin/arm support for .no_dead_strip

llvm-svn: 78734
2009-08-11 22:31:42 +00:00
Daniel Dunbar 526bcd461a X86/AsmParser: Mark MOV64GSrm, MOV64FSrm, GS_MOV32rm, FS_MOV32rm as codegen only.
llvm-svn: 78733
2009-08-11 22:24:40 +00:00
Chris Lattner 6747b39ca5 factorize darwin ProtectedDirective and SetDirective.
llvm-svn: 78732
2009-08-11 22:22:44 +00:00
Daniel Dunbar c4f8ea4ccb Add 'isCodeGenOnly' bit to Instruction .td records.
- Used to mark fake instructions which don't correspond to an actual machine
   instruction (or are duplicates of a real instruction). This is to be used for
   "special cases" in the .td files, which should be ignored by things like the
   assembler and disassembler. We still need a good solution to handle pervasive
   duplication, like with the Int_ instructions.

 - Set the bit on fake "mov 0" style instructions, which allows turning an
   assembler matcher warning into a hard error.

 - -2 FIXMEs.

llvm-svn: 78731
2009-08-11 22:17:52 +00:00
Chris Lattner d832c8e87c all darwin targets have .space and .zerofill, pull up.
llvm-svn: 78730
2009-08-11 22:17:31 +00:00
Chris Lattner f710f71839 eliminate template from arm TAI
llvm-svn: 78729
2009-08-11 22:14:59 +00:00
Chris Lattner 374d5770f0 fix a bug I introduced in r78724 that caused failures in:
CodeGen/X86/dll-linkage.ll & CodeGen/X86/mingw-alloca.ll

llvm-svn: 78728
2009-08-11 22:12:58 +00:00
Chris Lattner 7faf1fd9a0 move LCOMMDirective = "\t.lcomm\t" up to DarwinTAI, eliminate
template in PPC backend for TAI.

llvm-svn: 78727
2009-08-11 22:06:07 +00:00
Owen Anderson c6daf8f17c Fix warnings.
llvm-svn: 78725
2009-08-11 21:59:30 +00:00
Chris Lattner 0909918514 eliminate the X86TargetAsmInfo template.
llvm-svn: 78724
2009-08-11 21:57:08 +00:00
Sean Callanan f0e62eb78f Added ADD instructions with rAX as one parameter to the Intel instruction
tables.

llvm-svn: 78721
2009-08-11 21:26:06 +00:00
Evan Cheng cc9ca3500d Shrinkify Thumb2 load / store multiple instructions.
llvm-svn: 78717
2009-08-11 21:11:32 +00:00
Daniel Dunbar e431871851 llvm-mc/AsmParser: Allow target to specific a comment delimiter, which will be
used to strip hard coded comments out of .td assembly strings.

llvm-svn: 78716
2009-08-11 20:59:47 +00:00
Owen Anderson 828e2644fc struct -> class
llvm-svn: 78715
2009-08-11 20:52:44 +00:00
Dan Gohman dbae4db67a Optimize exact sdiv by a constant power of 2 to ashr.
llvm-svn: 78714
2009-08-11 20:47:47 +00:00
Owen Anderson 9f94459d24 Split EVT into MVT and EVT, the former representing _just_ a primitive type, while
the latter is capable of representing either a primitive or an extended type.

llvm-svn: 78713
2009-08-11 20:47:22 +00:00
Daniel Dunbar a1e04d43c4 StringRef: Add find(char) and find(StringRef).
Also, regroup functions.

llvm-svn: 78712
2009-08-11 20:47:15 +00:00
Chris Lattner 2c30970b22 pass the TargetTriple down from each target ctor to the
LLVMTargetMachine ctor.  It is currently unused.

llvm-svn: 78711
2009-08-11 20:42:37 +00:00
Chris Lattner 67e5ea2726 now that JumpTableDirective can differentate picness itself, MIPS TAI
no longer needs a targetmachine to initialize itself.

llvm-svn: 78710
2009-08-11 20:32:51 +00:00
Chris Lattner fe27130454 split "JumpTableDirective" (an existing hack) into a PIC and nonPIC
version.  This allows TAI implementations to specify the directive to use
based on the mode being codegen'd for.

The real fix for this is to remove JumpTableDirective, but I don't feel
like diving into the jumptable snarl just now.

llvm-svn: 78709
2009-08-11 20:30:58 +00:00
Chris Lattner d5a9179685 "TAI::JumpTableDirective" is always null for current arm targets, simplify
the code based on this and make it fall through better.

llvm-svn: 78708
2009-08-11 20:29:57 +00:00
Dan Gohman 77ad32ab0e Add convenience functions for creating nsw add operators.
llvm-svn: 78707
2009-08-11 20:20:39 +00:00
Daniel Dunbar 34c8791ff0 llvm-mc/AsmMatcher: Fix two thinkos in determining whether two classes are
related.

llvm-svn: 78706
2009-08-11 20:10:07 +00:00
Dan Gohman f9d12f23cb Use wchar.h to get wchar_t, not ctype.h.
llvm-svn: 78703
2009-08-11 19:59:21 +00:00
Dan Gohman 221a2c711d Don't set the isexact flag if an sdiv operator has been folded into
something else.

llvm-svn: 78702
2009-08-11 19:56:00 +00:00
Jim Grosbach 841850ed26 Add Thumb2 eh_sjlj_setjmp implementation
llvm-svn: 78701
2009-08-11 19:42:21 +00:00
Daniel Dunbar 919fe2bd2f Simplify ConstantExpr::getInBoundsGetElementPtr and fix a possible crash, if
constant folding eliminated the GEP instruction.
 - clang was hitting this on its test suite (for x86_64, at least).

llvm-svn: 78698
2009-08-11 18:28:09 +00:00
Daniel Dunbar 270968279b Revert 78680 until I figure out why it completely broke things.
llvm-svn: 78697
2009-08-11 18:11:15 +00:00
Devang Patel 5c310be0ff Link NamedMDNodes.
llvm-svn: 78696
2009-08-11 18:01:24 +00:00
Dan Gohman 50c09d0ca3 Add convenience functions for creating inbounds GEPs.
llvm-svn: 78695
2009-08-11 17:57:01 +00:00
David Goodwin 92492f2f8e Use DEBUG macro for debug output.
llvm-svn: 78694
2009-08-11 17:56:42 +00:00
Chris Lattner 5d47e93532 add a trivial line # cache to SourceMgr to make repeated queries to
FindLineNumber much faster when in sequence.

llvm-svn: 78693
2009-08-11 17:49:14 +00:00
Daniel Dunbar 7f8a9ebc8d llvm-mc: Fix a crash on invalid due to a typo in relocatable expression
evaluation.

llvm-svn: 78692
2009-08-11 17:47:52 +00:00
Benjamin Kramer 78c3bcb582 Make LLVMContext and LLVMContextImpl classes instead of structs.
llvm-svn: 78690
2009-08-11 17:45:13 +00:00
Daniel Dunbar 5c13812e2f Remove some unnecessary LoadInst constructors, missed during Twinification.
llvm-svn: 78689
2009-08-11 17:38:47 +00:00
Chris Lattner 73e9f8c636 make owen happy by being explicit.
llvm-svn: 78688
2009-08-11 17:38:15 +00:00