Commit Graph

9343 Commits

Author SHA1 Message Date
Owen Anderson
af7ec97587 Return ConstantVector to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 21:19:26 +00:00
Daniel Dunbar
a2edbabcb8 Provide generic MCAsmParser when constructing target specific parsers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 20:47:52 +00:00
Devang Patel
d2f79a1346 Add DebugInfoEnumerator to collect debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77360 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 19:55:13 +00:00
Andreas Bolka
c3cc45aa8b Simplify LDA-internal interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77359 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 19:50:13 +00:00
Owen Anderson
1fd7096407 Change ConstantArray to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 18:32:17 +00:00
Daniel Dunbar
cbbe248441 Expose Tokens to target specific assembly parsers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77337 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 17:58:44 +00:00
Chris Lattner
4bb253c60f the apple "ld_classic" linker doesn't support .literal16 in 32-bit
mode, and "ld64" (the default linker) falls back to it in -static
mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77334 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 17:50:28 +00:00
Stefanus Du Toit
9b97fc785b Include cmath/math.h in DataTypes.h regardless of whether MSVC is being used.
Fixes MSVC build of LiveInterval.cpp.

Patch by Nicolas Capens.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77317 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 13:41:07 +00:00
Chris Lattner
f0144127b9 Rip all of the global variable lowering logic out of TargetAsmInfo. Since
it is highly specific to the object file that will be generated in the end,
this introduces a new TargetLoweringObjectFile interface that is implemented
for each of ELF/MachO/COFF/Alpha/PIC16 and XCore.

Though still is still a brutal and ugly refactoring, this is a major step
towards goodness.

This patch also:
1. fixes a bunch of dangling pointer problems in the PIC16 backend.
2. disables the TargetLowering copy ctor which PIC16 was accidentally using.
3. gets us closer to xcore having its own crazy target section flags and
   pic16 not having to shadow sections with its own objects.
4. fixes wierdness where ELF targets would set CStringSection but not
   CStringSection_.  Factor the code better.
5. fixes some bugs in string lowering on ELF targets.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 03:13:23 +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
Daniel Dunbar
3d2a56d387 Add a comment on Value explaining the current getName() behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 22:39:14 +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
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
Dan Gohman
5a4e2a47b3 Order unsigned before signed, for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:49:34 +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
Chris Lattner
dd061f6085 simplify #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77250 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 21:13:35 +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
Devang Patel
e2d5a6c3bb 80 columns!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 20:30:05 +00:00
Sean Callanan
1abcfce716 Thanks, Bill!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 19:45:28 +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
Sean Callanan
e91ea06dff Many of Daniel's fixes.
I'm returning the number of bytes actually copied so that the client has some
warning when it reads past the end of the buffer.

I'm keeping the distinction between getByte() and getBytes() for now for
subclasses that use functions like ptrace() on Linux and only have a restricted
interface.  This makes their implementation easier, and subclasses can always
write a one-line implementation of readByte() that uses their custom 
readBytes().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77225 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:33:24 +00:00
Douglas Gregor
a4e3879339 CMake configuration: find mkdtemp, mkstemp, mktemp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77219 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 18:23:41 +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
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
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
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
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
Chris Lattner
7e763ebd98 Use the RHS length instead of the LHS length. They are both the same,
but this ends up compiling code like this:

int foo(const StringRef &R) {
  return R == "food";
}

to use a constant sized memcmp instead of a variable memcmp.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77160 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 17:46:03 +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
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
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
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
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
37939c910f Make the kind actually be private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 06:51:27 +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
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
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
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
Chris Lattner
38b77f8c93 fix isReadOnly predicate to not include data that has to be
writable because of teh dynamic linker.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 04:18:10 +00:00
Chris Lattner
f276990625 remove a dead enum case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77121 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 04:09:02 +00:00