Commit Graph

2695 Commits

Author SHA1 Message Date
Daniel Dunbar
ee16638bfc Remove unnecessary ProfileInfoLoader methods.
- Part of optimal static profiling patch sequence by Andreas Neustifter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78199 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 15:55:56 +00:00
Anton Korobeynikov
26964b6dc1 Pass user only if it's non-empty. Patch by Sandeep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 09:32:53 +00:00
Anton Korobeynikov
86c006a971 Add save-temps option to bugpoint to keep temporary stuff.
Patch by Sandeep Patel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 09:32:10 +00:00
Dan Gohman
d9283ed746 lli doesn't need <iostream> anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78133 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 00:28:59 +00:00
Owen Anderson
48b2f3e485 Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
not hideous.  Also, fix some MSVC compile errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-04 22:41:48 +00:00
Daniel Dunbar
4b3d57228c No really, it's unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78047 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-04 04:08:40 +00:00
Daniel Dunbar
4e02eb0f67 Provide target data from the module if the target machine doesn't have any.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77973 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 17:34:19 +00:00
Nick Lewycky
3e4c41a84a Remove the GCC path from libLTO. This has been superceded by setAssemblerPath.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 07:16:42 +00:00
Daniel Dunbar
4bd03abe59 Remove now unused arguments from TargetRegistry::lookupTarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 04:20:57 +00:00
Daniel Dunbar
3c2d4bf97f Pass target triple string in to TargetMachine constructor.
This is not just a matter of passing in the target triple from the module;
currently backends are making decisions based on the build and host
architecture. The goal is to migrate to making these decisions based off of the
triple (in conjunction with the feature string). Thus most clients pass in the
target triple, or the host triple if that is empty.

This has one important change in the way behavior of the JIT and llc.

For the JIT, it was previously selecting the Target based on the host
(naturally), but it was setting the target machine features based on the triple
from the module. Now it is setting the target machine features based on the
triple of the host.

For LLC, -march was previously only used to select the target, the target
machine features were initialized from the module's triple (which may have been
empty). Now the target triple is taken from the module, or the host's triple is
used if that is empty. Then the triple is adjusted to match -march.

The take away is that -march for llc is now used in conjunction with the host
triple to initialize the subtarget. If users want more deterministic behavior
from llc, they should use -mtriple, or set the triple in the input module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03 04:03:51 +00:00
Chris Lattner
1ef9be2883 Make SectionKind::get() private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77835 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-02 00:02:44 +00:00
Chris Lattner
5d6554255b update for API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77804 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 21:14:30 +00:00
Chris Lattner
4a7bc1e5aa All MCSections are now required to have a SectionKind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77787 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 18:25:49 +00:00
Daniel Dunbar
a6b3c5db2e llvm-mc: More quoted identifier support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 00:48:30 +00:00
Daniel Dunbar
76c4d7696c llvm-mc: Support quoted identifiers.
- Uses MCAsmToken::getIdentifier which returns the (sub)string representing the
   meaningfull contents a string or identifier token.

 - Directives aren't done yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 21:55:09 +00:00
Owen Anderson
a7235ea724 Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 20:28:14 +00:00
Chris Lattner
6bdd74ca38 fix some more issues where we expected GetSection to do "get or create"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 18:27:48 +00:00
Chris Lattner
56594f9884 fix a bunch of failing tests now that MCContext::GetSection doesn't create sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77689 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 17:47:16 +00:00
Owen Anderson
9e9a0d5fc2 Move more code back to 2.5 APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:03:37 +00:00
Devang Patel
124e6eb09d Handle NamedMDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77633 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:03:19 +00:00
Owen Anderson
debcb01b0f Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 22:17:13 +00:00
Owen Anderson
baf3c40440 Move ConstantExpr to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 18:55:55 +00:00
David Goodwin
265d82e4c6 Add a bugpoint flag to disable block extraction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77389 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 23:08:36 +00:00
Daniel Dunbar
cf593a3f43 Update CMakeLists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 22:46:39 +00:00
Daniel Dunbar
16cdcb38b2 Move X86 instruction parsing into X86/AsmParser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77384 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 22:40:46 +00:00
Daniel Dunbar
e240beb065 Make expression parsing and error/warning reporting available through the
generic MCAsmParser interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77381 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 22:22:31 +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
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
8e7c38e17b Switch X86 assembly parser to using the generic lexer interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77341 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 18:17:26 +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
Daniel Dunbar
a3c924f83a Switch AsmLexer::Lex to returning a reference to the current token.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77328 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 16:56:42 +00:00
Daniel Dunbar
419adedaa1 Drop some AsmLexer methods in favor of their AsmToken equivalents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77323 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 16:38:40 +00:00
Daniel Dunbar
3f87233d70 llvm-mc: Sink token enum into AsmToken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77322 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 16:08:33 +00:00
Nick Lewycky
db1e9981b8 Remove memory corruption bug. string.c_str() was returning a temporary that was
dead before we used it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77304 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 06:53:50 +00:00
Daniel Dunbar
cb358b63a7 llvm-mc: Factor AsmToken class out of AsmLexer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 03:00:54 +00:00
Daniel Dunbar
825e385ffe llvm-mc: Stop uniqueing string tokens, nothing actually uses this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77287 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 00:58:50 +00:00
Dan Gohman
b6dec1bdd6 Pass true to the Internalize parameter of createStandardLTOPasses,
to match llvm-ld's default behavior.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 23:23:47 +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
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
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
Nick Lewycky
d42b58b61c Fix libLTO:
* Call InitializeAllTargets on every path where we might query the
   TargetRegistry. This fixes PR4604.
 * flush the formatted_raw_ostream& or else not all of the assembly will make
   it to the .s file. (It doesn't do this in its destructor?!)
 * Due to a reversed conditional, libLTO was reporting many symbols as both
   defined and undefined, including two definitions of the same symbol name
   in its symbol list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77170 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 22:16:39 +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
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
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
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
Daniel Dunbar
d5b385c09f One more getName -> getNameStr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77027 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 00:43:31 +00:00
Owen Anderson
eed707b1e6 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:12:02 +00:00
Daniel Dunbar
f6ccee5a9d Switch to getNameStr().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 08:24:36 +00:00
Reid Kleckner
10b4fc552f Re-committing r76828 with the JIT memory manager changes now that the build
bots like the BumpPtrAllocator changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 21:46:56 +00:00
Daniel Dunbar
6316fbcb04 Convert StringMap to using StringRef for its APIs.
- Yay for '-'s and simplifications!

 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.

 - NIFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-23 18:17:34 +00:00