Chris Lattner
0e6e8cb590
some simple whitespace cleanup, avoid copying vectors for no reason
...
as much, etc.
llvm-svn: 76578
2009-07-21 16:44:47 +00:00
Daniel Dunbar
1f982105a6
Add StringRef::{substr, startswith}.
...
llvm-svn: 76559
2009-07-21 09:18:49 +00:00
Evan Cheng
07a6ac6b29
Another rewriter bug exposed by recent coalescer changes. ReuseInfo::GetRegForReload() should make sure the "switched" register is in the desired register class. I'm surprised this hasn't caused more failures in the past.
...
llvm-svn: 76558
2009-07-21 09:15:00 +00:00
Daniel Dunbar
f477ac5655
Add missing include.
...
llvm-svn: 76555
2009-07-21 08:58:44 +00:00
Daniel Dunbar
d08978cb43
Switch this API to StringRef.
...
llvm-svn: 76554
2009-07-21 08:57:31 +00:00
Daniel Dunbar
5899e340f3
Simplify / normalize some uses of Value::getName.
...
llvm-svn: 76553
2009-07-21 08:54:24 +00:00
Daniel Dunbar
25f9fc5851
Add StringRef class, with fixes.
...
llvm-svn: 76543
2009-07-21 07:28:51 +00:00
Torok Edwin
e32cd94b47
unbreak unit-tests on gcc-4.4.
...
llvm-svn: 76542
2009-07-21 07:09:05 +00:00
Daniel Dunbar
0ecb504508
Remove some unused code.
...
llvm-svn: 76541
2009-07-21 07:08:59 +00:00
Bruno Cardoso Lopes
12e543228d
Support adding relocations for data sections, handling the cases where
...
global declared symbols are initialized with references from other global
symbols.
llvm-svn: 76540
2009-07-21 06:51:32 +00:00
Chris Lattner
83423aa276
remove a very large testcase for now.
...
llvm-svn: 76537
2009-07-21 06:28:36 +00:00
Evan Cheng
715e6c0a0f
Add jumps with 8-bit relocation for assembler / disassembler. Patch by Sean Callanan.
...
llvm-svn: 76536
2009-07-21 06:00:18 +00:00
Evan Cheng
a7bb55ebb6
Fix a dagga combiner bug: avoid creating illegal constant.
...
Is this really a winning transformation?
fold (shl (srl x, c1), c2) -> (shl (and x, (shl -1, c1)), (sub c2, c1)) or
(srl (and x, (shl -1, c1)), (sub c1, c2))
llvm-svn: 76535
2009-07-21 05:40:15 +00:00
Owen Anderson
2ad52176f9
Move a bit more state over to the LLVMContext.
...
llvm-svn: 76533
2009-07-21 02:47:59 +00:00
Bill Wendling
a8e2ad3e3c
Add the following functions:
...
- SYSCALL (normal fast system call instruction) [0f 05]
- SYSENTER (system call entry instruction) [0f 34]
- SYSEXIT (system call exit instruction) [0f 35]
- SYSEXIT64 (system call exit instruction to 64-bit user code) [REX.W 0f 35]
- SYSRET (system call return instruction) [0f 07]
Patch by Sean Callanan.
llvm-svn: 76528
2009-07-21 01:07:24 +00:00
Dan Gohman
a3a6dea8d5
Add a testcase for PR2831.
...
llvm-svn: 76527
2009-07-21 01:02:18 +00:00
Dan Gohman
52e14d2272
Add a testcase for PR4569, which is now fixed.
...
llvm-svn: 76526
2009-07-21 00:50:52 +00:00
Dan Gohman
75dced058a
Make the range calculations for addrecs to be more conservative,
...
as they aren't currently prepared to handle complicated overflow
cases.
llvm-svn: 76524
2009-07-21 00:42:47 +00:00
Dan Gohman
32291b1afc
Whitespace cleanups.
...
llvm-svn: 76523
2009-07-21 00:38:55 +00:00
Dan Gohman
d571c37b54
Minor code simplification.
...
llvm-svn: 76521
2009-07-21 00:37:45 +00:00
Evan Cheng
0d8b0cf3b8
Fix ARM isle code that optimize multiply by constants which are power-of-2 +/- 1.
...
llvm-svn: 76520
2009-07-21 00:31:12 +00:00
Evan Cheng
9a47392f2e
Cross RC coalescing is now on by default.
...
llvm-svn: 76519
2009-07-21 00:22:59 +00:00
Dale Johannesen
68cb8d0310
revert 76503 while I figure out what's going on
...
llvm-svn: 76517
2009-07-21 00:12:29 +00:00
Dan Gohman
3439262586
Add a comment to clarify why there isn't any code in this spot.
...
llvm-svn: 76505
2009-07-20 23:54:43 +00:00
Dan Gohman
00c1aaec5a
Remove the code that tried to evaluate whether (A pred B) is known
...
by determining if (B pred (B-A)) is known, as it doesn't handle
overflow correctly.
llvm-svn: 76504
2009-07-20 23:53:35 +00:00
Dale Johannesen
a2d2adfa4e
Make sure a global matching asm 'i' constraint gets its
...
flags set properly. (hasMemory is clearly irrelevant
when matching 'i', I don't understand what this was
supposed to be doing.)
gcc.apple/asm-block-25.c (test passed before by
accident, but generated code was wrong)
llvm-svn: 76503
2009-07-20 23:39:13 +00:00
Dale Johannesen
ade297d496
Move stripping of bitcasts in inline asm arguments
...
to a place where it affects everything. Occurs
only on calls AFAIK.
llvm-svn: 76502
2009-07-20 23:27:39 +00:00
Dan Gohman
d231d78f3f
Minor code simplification.
...
llvm-svn: 76496
2009-07-20 22:41:51 +00:00
Dan Gohman
b07de44d5a
Documentation for the new non-overflow and exact keywords.
...
llvm-svn: 76495
2009-07-20 22:41:19 +00:00
Dan Gohman
1a7ab9473f
The upper argument of ConstantRange is exclusive, not inclusive.
...
llvm-svn: 76492
2009-07-20 22:34:18 +00:00
Chris Lattner
2cd8f753c0
clean up some formatting, indent by 2 instead of 4.
...
llvm-svn: 76490
2009-07-20 22:23:48 +00:00
David Goodwin
711b9e809c
CMP and TST define CPSR, not use it.
...
llvm-svn: 76489
2009-07-20 22:13:31 +00:00
David Greene
40c68ad3bb
Re-apply 75490, 75806 and 76177 with fixes and tests. Efficiency comes
...
next.
llvm-svn: 76486
2009-07-20 22:02:59 +00:00
Evan Cheng
a2b8c3f98f
Forgot this test earlier.
...
llvm-svn: 76485
2009-07-20 21:46:42 +00:00
Bill Wendling
d04f088345
Simplify the code in DarwinTargetAsmInfo::emitUsedDirectiveFor so that humans can understand it.
...
llvm-svn: 76480
2009-07-20 21:38:26 +00:00
Bill Wendling
dde1a8eef4
Pass in the unfortunately named "LessPrivatePrefix" for the
...
"LinkerPrivatePrefix". It seems to have been used in only one place before I
started this "linker_private" business. I'm thinking that a rename is in
order...
llvm-svn: 76479
2009-07-20 21:30:28 +00:00
Dan Gohman
0ebd69614c
Assembly and Bitcode support for unsigned/signed overflow flags and
...
exact sdiv flags.
llvm-svn: 76475
2009-07-20 21:19:07 +00:00
Evan Cheng
57106d6dc0
Use TII->findCommutedOpIndices to find the commute operands (rather than guessing).
...
llvm-svn: 76472
2009-07-20 21:16:08 +00:00
Bill Wendling
2dd0bf8db0
Change the casting of linkage types into a map. This makes this much more robust
...
as it no longer depends upon two different enums being kept in sync with each
other.
llvm-svn: 76465
2009-07-20 20:34:46 +00:00
Dan Gohman
e29ed8c857
Clarify that OverflowingBinaryOperator is not used for SDiv, even though
...
SDiv is a binary operation that can overflow.
llvm-svn: 76464
2009-07-20 20:32:43 +00:00
Kevin Enderby
ee5513582d
Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as
...
the parsing of the .dump and .load should be done in the assembly parser and
not have any need for an MCStreamer API. Changed the code for now so these
just produce an error saying these specific directives are not yet implemented
since they are likely no longer used and may never need to be implemented.
llvm-svn: 76462
2009-07-20 20:25:37 +00:00
Daniel Dunbar
2b11c7de4a
Add MCAsmLexer interface.
...
- This provides the AsmLexer interface to the target specific assembly parsers.
llvm-svn: 76460
2009-07-20 20:01:54 +00:00
Evan Cheng
027d9f93ea
Fix some sub-reg coalescing bugs where the coalescer wasn't updating the resulting interval's register class.
...
llvm-svn: 76458
2009-07-20 19:47:55 +00:00
Eli Friedman
2aa1a2a8f3
Remove FIXME that was already fixed.
...
llvm-svn: 76457
2009-07-20 19:45:16 +00:00
Bill Wendling
1bcfbff7af
Rename Mangler linkage enums to something less gross.
...
llvm-svn: 76456
2009-07-20 19:41:27 +00:00
Devang Patel
8ff0f8d79b
Refactor metadata parsing routines into separate functions.
...
llvm-svn: 76455
2009-07-20 19:00:08 +00:00
Daniel Dunbar
3c2a893ac7
Add MCAsmParser interface.
...
- This provides the AsmParser interface to the target specific assembly
parsers.
llvm-svn: 76453
2009-07-20 18:55:04 +00:00
Douglas Gregor
289dfc5e34
Build FileCheck from with CMake
...
llvm-svn: 76449
2009-07-20 18:30:25 +00:00
Bill Wendling
002b16724e
Put new enum at end of list to avoid changing ABI.
...
llvm-svn: 76447
2009-07-20 18:22:52 +00:00
Chris Lattner
6b1be83937
remove TargetAsmInfo::ExpandInlineAsm
...
llvm-svn: 76445
2009-07-20 17:59:32 +00:00
Chris Lattner
470a8da807
use ExpandInlineAsm on TargetLowering instead of TargetAsmInfo.
...
llvm-svn: 76442
2009-07-20 17:52:52 +00:00
Chris Lattner
5849d22bd1
Copy ExpandInlineAsm to TargetLowering from TargetAsmInfo.
...
llvm-svn: 76441
2009-07-20 17:51:36 +00:00
Dan Gohman
8a601ed3eb
Drop UDivOperator and introduce SDivOperator. Thanks to Chris
...
for noticing this.
llvm-svn: 76440
2009-07-20 17:51:10 +00:00
Chris Lattner
809cf7e0e1
add some fixme's and cleanups. TargetAsmInfo shouldn't depend on VMCore eventually.
...
llvm-svn: 76439
2009-07-20 17:47:48 +00:00
Dan Gohman
16e96c047f
Update this comment.
...
llvm-svn: 76438
2009-07-20 17:44:17 +00:00
Dan Gohman
33a3fd0b9c
Revert the addition of hasNoPointerOverflow to GEPOperator.
...
Getelementptrs that are defined to wrap are virtually useless to
optimization, and getelementptrs that are undefined on any kind
of overflow are too restrictive -- it's difficult to ensure that
all intermediate addresses are within bounds. I'm going to take
a different approach.
Remove a few optimizations that depended on this flag.
llvm-svn: 76437
2009-07-20 17:43:30 +00:00
Chris Lattner
02eb6b7e2f
remove dead forward decl
...
llvm-svn: 76433
2009-07-20 17:23:00 +00:00
David Goodwin
47ca461c82
For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.').
...
llvm-svn: 76432
2009-07-20 17:15:03 +00:00
Chris Lattner
d290543332
rename TargetAsmInfo::getASDirective -> getDataASDirective
...
llvm-svn: 76431
2009-07-20 17:12:46 +00:00
Daniel Dunbar
0854f5c6a8
Fix comment.
...
llvm-svn: 76427
2009-07-20 16:50:16 +00:00
David Greene
7ea9d0b6e2
Hide the DOUT static variable behind a function interface.
...
llvm-svn: 76425
2009-07-20 16:16:06 +00:00
David Goodwin
802a0b576f
Use t2LDRri12 for frame index loads.
...
llvm-svn: 76424
2009-07-20 15:55:39 +00:00
Evan Cheng
40ed0ae8ef
xfail for now.
...
llvm-svn: 76423
2009-07-20 15:33:09 +00:00
Eli Friedman
e04169cc21
PR4591: Make sure to initialize the pass manager before using it.
...
llvm-svn: 76422
2009-07-20 14:50:07 +00:00
Bruno Cardoso Lopes
447b7fd4bb
For PC relative relocations where symbols are defined in the same section they
...
are referenced, ignore the relocation entry and patch the relocatable field with
the computed symbol offset directly
llvm-svn: 76414
2009-07-20 08:52:02 +00:00
Daniel Dunbar
7369951bfe
Add -std-{compile,link}-opts to bugpoint.
...
- Sheesh.
llvm-svn: 76402
2009-07-20 07:01:01 +00:00
Evan Cheng
fa60698c29
Fix PR4567. Thumb1 target was using the wrong instruction to handle sp = sub fp, #c.
...
llvm-svn: 76401
2009-07-20 06:59:32 +00:00
Chris Lattner
58f9bb2ccd
implement a new magic global "llvm.compiler.used" which is like llvm.used, but
...
doesn't cause ".no_dead_strip" to be emitted on darwin.
llvm-svn: 76399
2009-07-20 06:14:25 +00:00
Evan Cheng
4e4eb0b00c
Restore AsmWriterEmitter.cpp back to 74742. The recent changes broke Thumb.
...
llvm-svn: 76398
2009-07-20 06:10:07 +00:00
Chris Lattner
029380fad7
use stripPointerCasts to simplify some code.
...
llvm-svn: 76397
2009-07-20 06:05:50 +00:00
Chris Lattner
ae76db5edd
document llvm.used and llvm.metadata. Stub out llvm.global_[cd]tors
...
llvm-svn: 76396
2009-07-20 05:55:19 +00:00
Bill Wendling
8693ef8558
Rename the index to linkage types.
...
llvm-svn: 76394
2009-07-20 02:41:50 +00:00
Bill Wendling
3023511345
More reformatting.
...
llvm-svn: 76393
2009-07-20 02:39:26 +00:00
Bill Wendling
972b720cc1
Fix HTML violations.
...
llvm-svn: 76392
2009-07-20 02:32:41 +00:00
Bill Wendling
d9a66f73c8
Obsessivly reformat.
...
llvm-svn: 76391
2009-07-20 02:29:24 +00:00
Evan Cheng
d214b72962
Model fpscr to prevent fcmped / fcmpezs etc from being deleted.
...
llvm-svn: 76390
2009-07-20 02:12:31 +00:00
Bill Wendling
a3c6f6bffa
Add plumbing for the `linker_private' linkage type. This type is meant for
...
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.
This is plumbing, so we don't have a use of it yet. More to come, etc.
llvm-svn: 76385
2009-07-20 01:03:30 +00:00
Daniel Dunbar
88f35c870b
CMake support for SystemZ.
...
llvm-svn: 76384
2009-07-20 00:24:17 +00:00
Daniel Dunbar
81d53960ad
This test should be run with -m32.
...
llvm-svn: 76382
2009-07-19 22:44:03 +00:00
Chris Lattner
14d021f538
fix test
...
llvm-svn: 76378
2009-07-19 20:19:25 +00:00
Chris Lattner
7e8aaad1a0
DisambiguateGlobalSymbols should not mangle intrinsics.
...
llvm-svn: 76377
2009-07-19 20:19:04 +00:00
Eli Friedman
be853b7b5d
Don't override LowerArguments in the SPARC backend. In addition to
...
being more consistent with other backends, this makes the SPARC backend
deal with functions with arguments with illegal types correctly, which
fixes some tests in test/CodeGen/Generic.
llvm-svn: 76375
2009-07-19 19:53:46 +00:00
Evan Cheng
151b23d043
Fix a regression from 76124. Thumb1 instructions default to S bit being true.
...
llvm-svn: 76374
2009-07-19 19:16:46 +00:00
Jakob Stoklund Olesen
aba695c7d0
Fix http://llvm.org/bugs/show_bug.cgi?id=4583
...
Inline asm instructions may have additional <imp-def,kill> register operands.
These operands are not marked with a flag like the normal asm operands, so we
must not assert that there is a flag.
llvm-svn: 76373
2009-07-19 19:09:59 +00:00
Daniel Dunbar
c8fb7c61a9
Fix build
...
llvm-svn: 76366
2009-07-19 08:27:16 +00:00
Xerxes Ranby
68602758e4
Fix: Kaleidoscope link in JIT and Interpreter by including JIT.h and Interpreter.h
...
llvm-svn: 76363
2009-07-19 08:10:01 +00:00
Nick Lewycky
567daf3ce8
Fix ConstantRange::unionWith. Also make it work a little hard in some cases to
...
return the smallest union of two ranges instead of just any range that happens
to contain the union.
llvm-svn: 76360
2009-07-19 03:44:35 +00:00
Daniel Dunbar
242b7b906d
Remove redundant qualifiers.
...
llvm-svn: 76357
2009-07-19 01:42:34 +00:00
Daniel Dunbar
ac0ca9241a
Fix some minor MSVC compiler warnings.
...
llvm-svn: 76356
2009-07-19 01:38:38 +00:00
Daniel Dunbar
acd56a0902
MSVC: Disable 4351, a completely useless warning: "warning: I'm not miscompiling
...
this". Um, ok, thanks!
llvm-svn: 76355
2009-07-19 01:35:10 +00:00
Daniel Dunbar
8c0f05b6be
Unbreak build
...
llvm-svn: 76354
2009-07-19 01:33:04 +00:00
Eli Friedman
916a0f3262
Switch Alpha over to the new call lowering style. New code mostly
...
copied from the SystemZ target. I don't think this causes any
significant changes to the output (I compared the assembly, and the
results appeared to be essentially unchanged), although I don't actually
have an Alpha to test on.
I would appreciate if anyone with the appropriate hardware could test
this. I'm not sure if that includes anyone subscribed to llvm-commits,
though.
llvm-svn: 76353
2009-07-19 01:11:32 +00:00
Daniel Dunbar
87ad1e54d4
SystemZ *does* have a CodeGen/AsmPrinter split.
...
- What it doesn't have is the rest of its cmake files...
llvm-svn: 76352
2009-07-19 00:46:44 +00:00
Daniel Dunbar
7eaf6dd84a
Tweak cmake files for the four targets that don't split CodeGen out.
...
- We should canonicalize this and get rid of the cmake and llvm-config hacks to
support both variants.
llvm-svn: 76350
2009-07-19 00:26:46 +00:00
Daniel Dunbar
83779208cc
Add dependencies from TargetInfo onto .td generation.
...
- Shouldn't really be necessary, but currently .inc files get included into
some main target headers.
llvm-svn: 76349
2009-07-19 00:21:12 +00:00
Bruno Cardoso Lopes
50bf9a60e5
Use R_X86_64_32S to handle Jump Table Index relocation entries. Hide TAI usage inside getSection* functions
...
llvm-svn: 76347
2009-07-18 23:24:01 +00:00
Daniel Dunbar
f03e78f024
Add some missing includes.
...
llvm-svn: 76346
2009-07-18 23:22:46 +00:00
Eli Friedman
048e78fc5b
Canonicalize bitcasts between types like <1 x i64> and i64 to
...
insertelement/extractelement.
I'm not entirely sure this is precisely what we want to do: should we
prefer bitcast(insertelement) or insertelement(bitcast)? Similarly. should we
prefer extractelement(bitcast) or bitcast(extractelement)?
llvm-svn: 76345
2009-07-18 23:06:53 +00:00
Daniel Dunbar
67038c1333
Put Target definitions inside Target specific header, and llvm namespace.
...
llvm-svn: 76344
2009-07-18 23:03:22 +00:00
Chris Lattner
cb3f64f945
fix some typos pointed out by Hidenobu Seki
...
llvm-svn: 76342
2009-07-18 21:47:15 +00:00