Commit Graph

3544 Commits

Author SHA1 Message Date
Duncan Sands
5470822eb1 Remove unused constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134318 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-02 13:05:02 +00:00
Evan Cheng
276365dd4b Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name to
be the first encoded as the first feature. It then uses the CPU name to look up
features / scheduling itineray even though clients know full well the CPU name
being used to query these properties.

The fix is to just have the clients explictly pass the CPU name!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134127 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-30 01:53:36 +00:00
Evan Cheng
ab8be96fd3 Sink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134049 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-29 01:14:12 +00:00
Chad Rosier
bd35f27ce9 Reinstate r133516 "Remove some unnecessary uses of c_str()." A trailing null
character in std::string was causing failures for a few ObjC and Obj-C++ tests
when -flto was enabled.  Revision 133999 resolved this issue. Thanks Jay!
rdar://9685235
PR10210


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134017 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-28 18:26:12 +00:00
Jay Foad
4f91054fe4 PR10210: New method ConstantArray::getAsCString(). Use it in LTO to
avoid getting embedded trailing null bytes in std::strings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133999 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-28 08:24:19 +00:00
Chad Rosier
26f448079f Revert r133516 "Remove some unnecessary uses of c_str()."
This was causing compile-time failures for some of the Objc and Obj-C++
benchmarks.  The specific errors were of the form: "ld: duplicate symbol …"
rdar://9660124

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133955 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-27 22:54:29 +00:00
Michael J. Spencer
25b15777df Object: Add proper error handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133872 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-25 17:55:23 +00:00
Michael J. Spencer
76fb9b0e5f Modify llvm-nm to use new Binary creation method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133871 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-25 17:54:59 +00:00
Michael J. Spencer
001c9205fc Make Binary the parent of ObjectFile and update children to new interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133870 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-25 17:54:50 +00:00
Jay Foad
06155e88d0 Remove some unnecessary uses of c_str().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133516 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-21 15:36:24 +00:00
Chris Lattner
b065b06c12 Revamp the "ConstantStruct::get" methods. Previously, these were scattered
all over the place in different styles and variants.  Standardize on two
preferred entrypoints: one that takes a StructType and ArrayRef, and one that
takes StructType and varargs.

In cases where there isn't a struct type convenient, we now add a
ConstantStruct::getAnon method (whose name will make more sense after a few
more patches land).  

It would be "really really nice" if the ConstantStruct::get and 
ConstantVector::get methods didn't make temporary std::vectors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133412 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-20 04:01:31 +00:00
Chris Lattner
0cd0d88160 eliminate the Type::getDescription() method, using "<<" instead. This
removes some gunk from LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133360 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-18 21:18:23 +00:00
Bill Wendling
e266ce6c6e Use the verbose asm flag instead of a new flag for decoding the LSDA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133292 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-17 20:55:01 +00:00
Bill Wendling
916a94b870 Add an option that allows one to "decode" the LSDA.
The LSDA is a bit difficult for the non-initiated to read. Even with comments,
it's not always clear what's going on. This wraps the ASM streamer in a class
that retains the LSDA and then emits a human-readable description of what's
going on in it.

So instead of having to make sense of:

Lexception1:
        .byte   255
        .byte   155
        .byte   168
        .space  1
        .byte   3
        .byte   26
Lset0 = Ltmp7-Leh_func_begin1
      .long     Lset0
Lset1 = Ltmp812-Ltmp7
      .long     Lset1
Lset2 = Ltmp913-Leh_func_begin1
      .long     Lset2
      .byte     3
Lset3 = Ltmp812-Leh_func_begin1
      .long     Lset3
Lset4 = Leh_func_end1-Ltmp812
      .long     Lset4
      .long     0
      .byte     0
      .byte     1
      .byte     0
      .byte     2
      .byte     125
      .long     __ZTIi@GOTPCREL+4
      .long     __ZTIPKc@GOTPCREL+4

you can read this instead:

## Exception Handling Table: Lexception1
##  @LPStart Encoding: omit
##    @TType Encoding: indirect pcrel sdata4
##        @TType Base: 40 bytes
## @CallSite Encoding: udata4
## @Action Table Size: 26 bytes

## Action 1:
##   A throw between Ltmp7 and Ltmp812 jumps to Ltmp913 on an exception.
##     For type(s):  __ZTIi@GOTPCREL+4 __ZTIPKc@GOTPCREL+4
## Action 2:
##   A throw between Ltmp812 and Leh_func_end1 does not have a landing pad.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133286 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-17 20:35:21 +00:00
Chris Lattner
4f6bab98c5 Drop the "2" suffix on some enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133274 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-17 18:17:37 +00:00
Chris Lattner
96a74c57d9 remove support for a bunch of obsolete instruction encodings
and other backward compatibility hacks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133273 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-17 18:09:11 +00:00
Chris Lattner
9d61dd9a08 Remove some "2" suffixes from the metadata enums now that "1" is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133269 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-17 17:50:30 +00:00
Chris Lattner
020a5a449f remove bitcode reader support for LLVM 2.7 metadata encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133268 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-17 17:48:53 +00:00
Michael J. Spencer
5e45dc40d3 Revert the last two commits in the series. r132911, r132912.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132913 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-13 11:53:31 +00:00
Michael J. Spencer
bc437ebbca Modify llvm-nm to use new Binary creation method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132912 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-13 11:12:42 +00:00
Michael J. Spencer
69aec36f9b Make Binary the parent of ObjectFile and update children to new interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132911 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-13 11:12:33 +00:00
Eli Friedman
be2d1239a4 Add -O1/2/3 to bugpoint, so when you conclude opt -O2 reproduces an issue, you can just run bugpoint -O2. :) My implementation isn't precisely equivalent to what opt does, but as far as I can tell, it's close enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132695 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-06 22:45:46 +00:00
Eli Friedman
42d41fda08 We only do always-inlining at -O1; make opt reflect that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132693 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-06 22:13:27 +00:00
Nick Lewycky
5d98c9ae71 Also remove -lLTO which should have been in r132349. I failed to apply this
from David Meyer's patch!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132352 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 20:00:45 +00:00
Nick Lewycky
471fa149d1 Make the gold plugin build on Cygwin as well as Linux. Patch by David Meyer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132349 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 19:53:26 +00:00
Evan Cheng
4992b03cbd Remove dead option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131947 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 01:43:38 +00:00
Chris Lattner
3e8984a0c4 initialize and finalize function passes, pointed out by Cameron.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131843 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 06:44:19 +00:00
Chris Lattner
efce071fd6 fix a file system case sensitivity issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131828 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:37:51 +00:00
Chris Lattner
52b28896c8 switch opt to using PassManagerBuilder.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131824 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:21:33 +00:00
Chris Lattner
9d70b6b306 switch llvm-ld. It has a terrible mechanism that people can add extra
passes, it should be converted to use extension points.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131823 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:21:15 +00:00
Chris Lattner
817a01ffb2 switch bugpoint and liblto to PassManagerBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131821 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:20:07 +00:00
Andrew Trick
dc5948d472 Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131780 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 00:56:46 +00:00
Oscar Fuentes
be5d9b0bdc CMake builds gold by default since revision 127466. This is
inconsistent with autoconf, which by default set BINUTILS_INCDIR to
empty and exclude gold from target list.

Based on a patch by Haitao Li!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131229 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-12 11:26:21 +00:00
Andrew Trick
1680832a9b Typo and missing checkin from r131186.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131187 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-11 16:44:08 +00:00
Andrew Trick
7c863eb8cc Bugpoint support for miscompilations that result in a crash.
This change allows bugpoint to pinpoint the "opt" pass and bitcode
segment responsible for a crash caused by miscompilation. At least it
works well for me now, without having to create any custom execution
wrappers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131186 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-11 16:31:24 +00:00
Jim Grosbach
f5bf3cf7e2 Tidy up. 80-column and whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131094 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-09 20:05:25 +00:00
Duncan Sands
2abb82b1d3 Remove an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130860 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-04 19:13:01 +00:00
Rafael Espindola
925dffa3b8 llvmc: Pass -disable-cfi to llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130712 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-02 19:45:24 +00:00
Rafael Espindola
debd7e4e8b Simplify the handling of pcrel relocations on ELF. Now we do the right thing
for all symbol differences and can drop the old EmitPCRelSymbolValue
method.

This also make getExprForFDESymbol on ELF equal to the one on MachO, and it
can be made non-virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130634 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-01 03:50:49 +00:00
Rafael Espindola
f1a5c7ec04 Add all the plumbing needed for MC to expand cfi to the old tables in
the final assembly. It is the same technique used when targeting
assemblers that don't support .loc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130587 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-30 03:44:37 +00:00
Chandler Carruth
d7797496a3 Revert an unintended commit. Very sorry for this one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130393 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 08:18:22 +00:00
Chandler Carruth
e825d88aea nuke gold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130391 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 08:17:05 +00:00
Mikhail Glushenkov
834b93b51d Remove all references to plugins from the LLVMC docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130090 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-24 14:17:32 +00:00
Jay Foad
ddcdcc8863 Remove unused STL header includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-23 19:53:52 +00:00
Mikhail Glushenkov
3335a99fe8 The .inc file is auto-generated and must not be edited by hand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130021 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-22 22:05:29 +00:00
Rafael Espindola
e8cfbd843d Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129955 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-21 23:39:26 +00:00
Nick Lewycky
333ed454d0 Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129902 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-21 01:54:08 +00:00
Daniel Dunbar
0ccc0dde33 llc: Fix a refacto, .loc support didn't work before 10.6.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129841 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-20 00:47:19 +00:00
Daniel Dunbar
558692fd0a ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OS
triple component.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129838 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-20 00:14:25 +00:00
Daniel Dunbar
912225e185 ADT/Triple: Move a variety of clients to using isOSDarwin() and isOSWindows()
predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129816 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-19 21:14:45 +00:00