Commit Graph

30553 Commits

Author SHA1 Message Date
Chris Lattner
7988aff079 don't copy TargetLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77293 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 03:05:40 +00:00
Dan Gohman
d6aa02de10 Teach instcombine to respect and preserve inbounds. Add inbounds
to a few tests where it is required for the expected transformation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77290 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 01:40:03 +00:00
Mike Stump
eb045ecba0 Fix a small little typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77289 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 01:35:34 +00:00
Dan Gohman
04d5544034 Replace dyn_castGetElementPtr with dyn_cast<GEPOperator>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77286 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 00:37:50 +00:00
Dan Gohman
a195b7ffd6 Grab the LLVMContext and parent Module of SI ahead of the
point where SI can get deleted. This fixes a use of free'd memory.
This fixes Externals/Povray.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 00:37:06 +00:00
David Goodwin
1f0962756d ORN does not require (and can not have) the ".w" suffix. "Orthogonality" is a dirty word at ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77275 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 23:34:12 +00:00
Mike Stump
66ad89ceba Fix a release-asserts warning. Debug functions should be marked used,
if there are no other uses.  If people don't need this routine
anymore, if should be deleted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77274 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 23:33:34 +00:00
Daniel Dunbar
f9507ffa5b llvm-mc: Implement .abort fully in the front end
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 23:20:52 +00:00
Mike Stump
02efa786d4 Avoid build warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 23:14:11 +00:00
Owen Anderson
8fa3338ed2 Move ConstantStruct back to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 22:29:26 +00:00
Dan Gohman
f08583b532 Add a comment about the "getelementptr null" trick.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:59:50 +00:00
Dan Gohman
dd8004dc73 Add a new keyword 'inbounds' for use with getelementptr. See the
LangRef.html changes for details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:53:46 +00:00
Daniel Dunbar
9a7e2ccf57 llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.
- My DFS traversal of LLVM is, at least for now, nearly complete! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77258 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:49:56 +00:00
Daniel Dunbar
b82eaa1823 Unbreak build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:47:07 +00:00
Dan Gohman
f78c835faa Make raw_null_ostream flush its buffer in its destructor, so that
it conforms to the assertion added in r77245. This fixes a failure
in qa_override.c in clang's testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77255 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:46:02 +00:00
Chris Lattner
2b2954f00b hoist MCContext/MCStreamer up to AsmPrinter since we're going to start creating
MCSections soon instead of Section for all targets, and we need something to
own them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:28:04 +00:00
Daniel Dunbar
b5261ebabb Move MCContext and friends to StringRef based APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:22:30 +00:00
Owen Anderson
6f83c9c6ef Move ConstantFP construction back to the 2.5-ish API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 20:59:43 +00:00
Dan Gohman
9a31254d0e Add an assertion check to raw_ostream's destructor to verify
that the subclass hasn't left any pending data in the buffer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77245 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 20:49:44 +00:00
David Goodwin
c9d138f505 Remove TPat. No patterns depend on just isThumb(). Must use either T1Pat (isThumb1Only()) or T2Pat (is Thumb2).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77242 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 19:59:26 +00:00
Bruno Cardoso Lopes
42286562ef fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 19:38:38 +00:00
Bruno Cardoso Lopes
df0b6503d6 add module identifier to the elf object file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77238 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 19:32:57 +00:00
Chris Lattner
3b07b5214c Sink getSectionPrefixForUniqueGlobal down into the TAI
implementations that need it, rearrange ELFTAI.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77236 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 19:14:14 +00:00
Chris Lattner
fa199f3c16 remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77233 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 19:00:33 +00:00
Bruno Cardoso Lopes
746e3bb354 Handle external symbols for ELF and add some static methods to ELFSym
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77232 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:54:47 +00:00
Evan Cheng
e0f21bd47f More DCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77231 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:48:45 +00:00
Evan Cheng
78703ddafe convertToThreeAddress can't handle Thumb2 instructions (which don't have same address mode as ARM instructions).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77230 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:44:00 +00:00
Devang Patel
ad895a8dec Initialize mdnNext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77229 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:42:56 +00:00
Evan Cheng
fc17fb0aee Get rid of more dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77227 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:38:54 +00:00
Evan Cheng
293f8d9b88 Cosmetic change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77222 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:31:40 +00:00
Evan Cheng
83e0e36be8 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77221 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:25:24 +00:00
Evan Cheng
5ca53a7ad8 Get rid of some more getOpcode calls.
This also fixes potential problems in ARMBaseInstrInfo routines not recognizing thumb1 instructions when 32-bit and 16-bit instructions mix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77218 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:20:05 +00:00
Mike Stump
487cdc1bdc Fix build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77217 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:18:30 +00:00
Sanjiv Gupta
be7b97b773 Remove duplicate entries while printing decls for external symbols.
Some libcall names are same, so they were getting printed twice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77215 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:04:34 +00:00
Douglas Gregor
e34887d5d0 CMake: make sure that the *.inc files for libSystem show up in the resulting
project.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77213 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 17:55:55 +00:00
Chris Lattner
a7defb7150 add an explanatory comment about why we drop these in readonly and
not in mergable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77210 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 17:39:40 +00:00
Devang Patel
41d89c2572 Do not seed mstadata into the value map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77208 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 17:17:04 +00:00
Chris Lattner
40412e7e90 make COFF work like ELF and macho, by splitting out into its own
header even though there is only one COFF target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77204 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:45:59 +00:00
Chris Lattner
afcb70bc73 don't create default text/data sections for all targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77203 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:44:04 +00:00
Chris Lattner
6470177588 Apparently alpha doesn't use ElfTargetAsmInfo (?)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77202 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:42:14 +00:00
David Goodwin
752aa7d2fe Thumb-2 does not have RSC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77201 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:39:05 +00:00
David Goodwin
af0d08d55c Add ".w" suffix for wide thumb-2 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:31:55 +00:00
Chris Lattner
33ae7a453b inline a method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77198 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:27:32 +00:00
Chris Lattner
20886cf91c apparently we have "windows" and "coff", which are different(?)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77197 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:22:39 +00:00
Chris Lattner
92ef3f66c1 sink text/data section creation down into the target-specific places that
should know about them.  PECoff doesn't share these, and I want all sections
to be created by object-file-specific code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77196 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:20:58 +00:00
Dan Gohman
59858cf792 Change the assembly syntax for nsw, nuw, and exact, putting them
after their associated opcodes rather than before. This makes them
a little easier to read.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77194 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:11:46 +00:00
Dan Gohman
07ad19b509 Fix wording in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 16:09:48 +00:00
Chris Lattner
de3a1078ab 32-bit darwin targets support .literal16 too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77191 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 15:44:04 +00:00
Benjamin Kramer
30d3b911c9 Test commit: fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77187 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 09:06:52 +00:00
Chris Lattner
e346694a81 Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 06:17:14 +00:00
Chris Lattner
5fe575ff4f Eliminate SectionFlags, just embed a SectionKind into Section
instead and drive things based off of that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 05:32:16 +00:00
Evan Cheng
1f5c988754 If CPSR is modified but the def is dead, then it's ok to fold the load / store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 04:18:04 +00:00
Evan Cheng
5732ca084a Use t2LDRi12 and t2STRi12 to load / store to / from stack frames. Eliminate more getOpcode calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77181 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 03:14:20 +00:00
Sanjiv Gupta
8e14eab07e Generate a libcall for i8 multiply.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 02:44:46 +00:00
Sanjiv Gupta
bf36cafb8c fixed incorrect lowering of ISD::SUB node. SUB has only one result value.
It wasn't caught during tests because we never got a sub generated, (i8 was always getting promoted to int, which in turn was broken into subc/sube). Though the optimizer leaves an i8 sub now. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77178 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 02:26:06 +00:00
Evan Cheng
08b93c6a70 Use the right instructions to copy between GPR and the more strictive tGPR classes. t2MOV does not match the RC requirements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 00:33:08 +00:00
Evan Cheng
dced03fc84 Merge isLoadFromStackSlot into one since it behaves the same regardless of sub-target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 00:24:36 +00:00
Evan Cheng
68e3c6ae49 Just use a single isMoveInstr to catch all the cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 00:05:15 +00:00
Evan Cheng
d83360694a Rename tMOVhi2lor to tMOVgpr2tgpr. It's not moving from a high register to a low register. It's moving from a GPR register class to a more restrictive tGPR class. Also change tMOVlor2hir, and tMOVhir2hir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77172 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 23:59:01 +00:00
Eli Friedman
b101b0bdbd Reorganize code a bit to reduce indentation. No visible functionality
change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77171 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 23:47:17 +00:00
Daniel Dunbar
2749b3e745 Don't use llvm_report_error in libSystem, this is a layering violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77169 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 21:16:42 +00:00
Chris Lattner
0fcf4dc6d3 untangle a TargetAsmInfo hack where ELFTargetAsmInfo would create a
'unnamed' bss section, but some impls would want a named one.  Since
they don't have consistent behavior, just make each target do their
own thing, instead of doing something "sortof common" then having
targets change immutable objects later.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 19:23:28 +00:00
Evan Cheng
30b2bdfa73 Refactor. Get rid of a few more getOpcode() calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 18:55:14 +00:00
Chris Lattner
74fb545163 reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 18:08:15 +00:00
Sanjiv Gupta
f9474ca928 Fix the breakage caused by 76950.
PIC16 has special naming conventions for variables having section names specified via section attribute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77153 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 10:25:01 +00:00
Daniel Dunbar
460f656475 Remove Value::getName{Start,End}, the last of the old Name APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77152 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 09:48:23 +00:00
Daniel Dunbar
4fa4990bdc Make sure getName().data() is always null terminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77149 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 09:22:02 +00:00
Daniel Dunbar
f0443c1eb4 Remove Value::getNameLen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77148 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 08:34:35 +00:00
Nick Lewycky
92fbbc7588 Move MSILModule and MSILWriter into the 'llvm' namespace, instead of the 'MSIL'
namespace which could very well conflict with non-LLVM code.

Also clean up some spacing, remove an extra header.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77146 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 08:16:51 +00:00
Daniel Dunbar
93b67e40de Eliminate some uses of DOUT, cerr, and getNameStart().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 07:49:05 +00:00
Chris Lattner
f40761d522 remove a densemap from TargetAsmInfo that was uniquing the targetflags strings,
just use a smallstring instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 07:33:58 +00:00
Chris Lattner
6468b44d3a simplify SectionFlagsForGlobal, even though I want to kill it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77143 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 07:17:39 +00:00
Chris Lattner
37088b3f82 make SectionKind keep track of whether a global had an explicit
section specified for it or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77142 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 07:14:28 +00:00
Chris Lattner
2b421dad78 simplify this code now that SectionKind knows if a global is weak or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77141 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 07:07:01 +00:00
Chris Lattner
4c50922f6b make SectionKind know whether a symbol is weak or not in addition
to its classification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77140 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 07:00:12 +00:00
Chris Lattner
2ceb60a677 rename Mergable -> Mergeable and Writable -> Writeable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 06:48:26 +00:00
Chris Lattner
94809c3b10 two files I missed in the last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77137 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 06:36:20 +00:00
Chris Lattner
2c5815d090 remove a bunch of helper functions, just use SectionKind::get instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77135 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 06:34:33 +00:00
Chris Lattner
5c2f789952 simplify getSectionForMergableConstant to take a SectionKind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77134 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 06:26:55 +00:00
Chris Lattner
f15327290e precreate 4/8/16 byte mergable sections to simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 06:16:11 +00:00
Chris Lattner
8ca520944e introduce specialized mergable const sectionkinds for elements of size 4/8/16 to
simplify targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 06:11:33 +00:00
Chris Lattner
7f88a20f67 improve the default impl of getSectionForMergableConstant by
putting readonly constants in the readonly section if we have one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 05:57:07 +00:00
Chris Lattner
af89a96c6b make elf targets correctly handle constant pool entries that require relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 05:55:20 +00:00
Chris Lattner
e346e180f3 Rearrange all the SectionKinds and structure them into a hierarchical
group instead of a bunch of random unrelated ideas.  Provide predicates
to categorize a SectionKind into a group, and use them instead of 
getKind() throughout the code.

This also renames a ton of SectionKinds to be more consistent and
evocative, and adds a huge number of comments on the enums so that
I will hopefully be able to remember how this stuff works long from
now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77129 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 05:44:20 +00:00
Daniel Dunbar
77454a2105 Sort list of targets in --version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 05:09:50 +00:00
Daniel Dunbar
8977d087c6 Factor commonality in triple match routines into helper template for registering
classes, and migrate existing targets over.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 05:03:33 +00:00
Daniel Dunbar
8c2f1d7e44 Oops, forgot XCore. Sorry XCore!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77125 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 04:52:45 +00:00
Daniel Dunbar
6337f15b5a Update for API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77124 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 04:23:03 +00:00
Daniel Dunbar
a14d225ef4 Update Triple to use StringRef/Twine based APIs.
- This is now shorter, simpler, safer, and more efficient, what a deal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77119 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 03:31:47 +00:00
Chris Lattner
abb477f663 put normal data into .data instead of .data.rel on elf systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 03:06:11 +00:00
Daniel Dunbar
ad6c1539cd Remove unused header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 02:23:52 +00:00
Daniel Dunbar
fa27ff296d Kill Target specific ModuleMatchQuality stuff.
- This was overkill and inconsistently implemented.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 02:22:58 +00:00
Daniel Dunbar
a5881e3060 Add TargetRegistry::lookupTarget.
- This is a simplified mechanism which just looks up a target based on the
   target triple, with a few additional flags.

 - Remove getClosestStaticTargetForModule, the moral equivalent is now:
     lookupTarget(Mod->getTargetTriple, true, false, ...);

 - This no longer does the fuzzy matching with target data (based on endianness
   and pointer width) that getClosestStaticTargetForModule was doing, but this
   was deemed unnecessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77111 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 02:12:58 +00:00
Chris Lattner
13b9251eb1 eliminate a pointless switch stmt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 01:44:55 +00:00
Chris Lattner
30c4a3b9a8 finish simplifying DarwinTargetAsmInfo::SelectSectionForGlobal
for now.  Make the section switching directives more consistent
by not including \n and including \t for them all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 01:24:18 +00:00
Daniel Dunbar
499027fb48 Rewrite getName{Start,End,Len} in terms of getName(), instead of vice-versa.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77105 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:51:56 +00:00
Chris Lattner
e3577da6d9 simplify DarwinTargetAsmInfo::SelectSectionForGlobal a bit
and make it more aggressive, we now put:

const int G2 __attribute__((weak)) = 42;

into the text (readonly) segment like gcc, previously we put
it into the data (readwrite) segment.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77104 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:51:36 +00:00
Daniel Dunbar
07f6903cbe Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:42:33 +00:00
Bob Wilson
8bb9e48752 Add support for ARM Neon VREV instructions.
Patch by Anton Korzh, with some modifications from me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:39:34 +00:00
Daniel Dunbar
3f53fa9a51 Remove Value::setName(const char*, unsigned).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:34:27 +00:00