aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Include cmath/math.h in DataTypes.h regardless of whether MSVC is being used.Stefanus Du Toit2009-07-282-12/+12
| | | | | | | | 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
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-287-147/+203
| | | | | | | | | | | | | | | | | | | | | | | 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
* llvm-mc: Implement .abort fully in the front endDaniel Dunbar2009-07-271-7/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77272 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment on Value explaining the current getName() behavior.Daniel Dunbar2009-07-271-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77269 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ConstantStruct back to 2.5 API.Owen Anderson2009-07-272-12/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new keyword 'inbounds' for use with getelementptr. See theDan Gohman2009-07-272-2/+13
| | | | | | | LangRef.html changes for details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.Daniel Dunbar2009-07-272-4/+5
| | | | | | | - 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
* Order unsigned before signed, for consistency.Dan Gohman2009-07-271-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77257 91177308-0d34-0410-b5e6-96231b3b80d8
* Make raw_null_ostream flush its buffer in its destructor, so thatDan Gohman2009-07-271-0/+1
| | | | | | | | 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
* hoist MCContext/MCStreamer up to AsmPrinter since we're going to start creatingChris Lattner2009-07-271-0/+13
| | | | | | | | 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
* Move MCContext and friends to StringRef based APIs.Daniel Dunbar2009-07-273-7/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77251 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify #includes.Chris Lattner2009-07-271-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77250 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ConstantFP construction back to the 2.5-ish API.Owen Anderson2009-07-273-18/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 columns!Devang Patel2009-07-271-5/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77243 91177308-0d34-0410-b5e6-96231b3b80d8
* Thanks, Bill!Sean Callanan2009-07-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77240 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink getSectionPrefixForUniqueGlobal down into the TAI Chris Lattner2009-07-273-15/+7
| | | | | | | implementations that need it, rearrange ELFTAI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77236 91177308-0d34-0410-b5e6-96231b3b80d8
* Many of Daniel's fixes.Sean Callanan2009-07-271-15/+14
| | | | | | | | | | | | | | 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
* CMake configuration: find mkdtemp, mkstemp, mktemp.Douglas Gregor2009-07-271-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77219 91177308-0d34-0410-b5e6-96231b3b80d8
* make COFF work like ELF and macho, by splitting out into its ownChris Lattner2009-07-272-1/+30
| | | | | | | 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
* inline a method.Chris Lattner2009-07-271-6/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77198 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix wording in comments.Dan Gohman2009-07-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77193 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate getNamed/getUnnamedSection, adding a new and unified ↵Chris Lattner2009-07-271-4/+3
| | | | | | | | | getOrCreateSection instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77186 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate SectionFlags, just embed a SectionKind into SectionChris Lattner2009-07-272-69/+30
| | | | | | | 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
* untangle a TargetAsmInfo hack where ELFTargetAsmInfo would create aChris Lattner2009-07-262-6/+3
| | | | | | | | | | | '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
* Use the RHS length instead of the LHS length. They are both the same,Chris Lattner2009-07-261-1/+1
| | | | | | | | | | | | | | 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
* Remove Value::getName{Start,End}, the last of the old Name APIs.Daniel Dunbar2009-07-261-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77152 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove Value::getNameLenDaniel Dunbar2009-07-261-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77148 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate some uses of DOUT, cerr, and getNameStart().Daniel Dunbar2009-07-261-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77145 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a densemap from TargetAsmInfo that was uniquing the targetflags strings,Chris Lattner2009-07-262-7/+9
| | | | | | | just use a smallstring instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77144 91177308-0d34-0410-b5e6-96231b3b80d8
* make SectionKind keep track of whether a global had an explicitChris Lattner2009-07-261-2/+9
| | | | | | | section specified for it or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77142 91177308-0d34-0410-b5e6-96231b3b80d8
* make SectionKind know whether a symbol is weak or not in additionChris Lattner2009-07-261-5/+9
| | | | | | | to its classification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77140 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the kind actually be private.Chris Lattner2009-07-261-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77139 91177308-0d34-0410-b5e6-96231b3b80d8
* rename Mergable -> Mergeable and Writable -> WriteableChris Lattner2009-07-263-40/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77138 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a bunch of helper functions, just use SectionKind::get instead.Chris Lattner2009-07-261-17/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77135 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify getSectionForMergableConstant to take a SectionKind.Chris Lattner2009-07-263-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77134 91177308-0d34-0410-b5e6-96231b3b80d8
* precreate 4/8/16 byte mergable sections to simplify code.Chris Lattner2009-07-261-6/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77133 91177308-0d34-0410-b5e6-96231b3b80d8
* introduce specialized mergable const sectionkinds for elements of size 4/8/16 toChris Lattner2009-07-261-2/+23
| | | | | | | simplify targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77132 91177308-0d34-0410-b5e6-96231b3b80d8
* Rearrange all the SectionKinds and structure them into a hierarchicalChris Lattner2009-07-261-49/+116
| | | | | | | | | | | | | | | 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
* Factor commonality in triple match routines into helper template for registeringDaniel Dunbar2009-07-261-12/+12
| | | | | | | classes, and migrate existing targets over. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77126 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, forgot XCore. Sorry XCore!Daniel Dunbar2009-07-261-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77125 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for API change.Daniel Dunbar2009-07-261-5/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77124 91177308-0d34-0410-b5e6-96231b3b80d8
* fix isReadOnly predicate to not include data that has to beChris Lattner2009-07-261-3/+1
| | | | | | | | writable because of teh dynamic linker. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77122 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a dead enum case.Chris Lattner2009-07-261-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77121 91177308-0d34-0410-b5e6-96231b3b80d8
* Update Triple to use StringRef/Twine based APIs.Daniel Dunbar2009-07-261-14/+14
| | | | | | | - 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
* Add StringRef::{slice, split}, two convenient string operations which are simpleDaniel Dunbar2009-07-261-3/+38
| | | | | | | and efficient on a StringRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77117 91177308-0d34-0410-b5e6-96231b3b80d8
* put normal data into .data instead of .data.rel on elf systems.Chris Lattner2009-07-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77116 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill Target specific ModuleMatchQuality stuff.Daniel Dunbar2009-07-261-12/+0
| | | | | | | - This was overkill and inconsistently implemented. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77114 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TargetRegistry::lookupTarget.Daniel Dunbar2009-07-261-14/+17
| | | | | | | | | | | | | | | - 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
* finish simplifying DarwinTargetAsmInfo::SelectSectionForGlobalChris Lattner2009-07-261-0/+9
| | | | | | | | 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
* Some clients rely on getName{Start,End} not returning 0, even if the length isDaniel Dunbar2009-07-261-2/+8
| | | | | | | | 0. - I could have swore the prev change went through a make check cycle... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77106 91177308-0d34-0410-b5e6-96231b3b80d8