Commit Graph

3471 Commits

Author SHA1 Message Date
Evan Cheng fe6e405e8c 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!

llvm-svn: 134127
2011-06-30 01:53:36 +00:00
Evan Cheng 8264e272a9 Sink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.
llvm-svn: 134049
2011-06-29 01:14:12 +00:00
Chad Rosier 772a91f8e4 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

llvm-svn: 134017
2011-06-28 18:26:12 +00:00
Jay Foad 2a31eb49c7 PR10210: New method ConstantArray::getAsCString(). Use it in LTO to
avoid getting embedded trailing null bytes in std::strings.

llvm-svn: 133999
2011-06-28 08:24:19 +00:00
Chad Rosier e967eefa00 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

llvm-svn: 133955
2011-06-27 22:54:29 +00:00
Michael J. Spencer 1d6167fd30 Object: Add proper error handling.
llvm-svn: 133872
2011-06-25 17:55:23 +00:00
Michael J. Spencer 6d7138a168 Modify llvm-nm to use new Binary creation method.
llvm-svn: 133871
2011-06-25 17:54:59 +00:00
Michael J. Spencer ec29b121ff Make Binary the parent of ObjectFile and update children to new interface.
llvm-svn: 133870
2011-06-25 17:54:50 +00:00
Jay Foad 7a8a5f7f1d Remove some unnecessary uses of c_str().
llvm-svn: 133516
2011-06-21 15:36:24 +00:00
Chris Lattner cc19efaa97 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.

llvm-svn: 133412
2011-06-20 04:01:31 +00:00
Chris Lattner 0f214ebe5a eliminate the Type::getDescription() method, using "<<" instead. This
removes some gunk from LLVMContext.

llvm-svn: 133360
2011-06-18 21:18:23 +00:00
Bill Wendling b74b9de151 Use the verbose asm flag instead of a new flag for decoding the LSDA.
llvm-svn: 133292
2011-06-17 20:55:01 +00:00
Bill Wendling e303114b3c 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.

llvm-svn: 133286
2011-06-17 20:35:21 +00:00
Chris Lattner c4407080dd Drop the "2" suffix on some enums.
llvm-svn: 133274
2011-06-17 18:17:37 +00:00
Chris Lattner f1c871098d remove support for a bunch of obsolete instruction encodings
and other backward compatibility hacks.

llvm-svn: 133273
2011-06-17 18:09:11 +00:00
Chris Lattner b877855bea Remove some "2" suffixes from the metadata enums now that "1" is gone.
llvm-svn: 133269
2011-06-17 17:50:30 +00:00
Chris Lattner 2feca50969 remove bitcode reader support for LLVM 2.7 metadata encoding.
llvm-svn: 133268
2011-06-17 17:48:53 +00:00
Michael J. Spencer aa41981dd8 Revert the last two commits in the series. r132911, r132912.
llvm-svn: 132913
2011-06-13 11:53:31 +00:00
Michael J. Spencer 902695c488 Modify llvm-nm to use new Binary creation method.
llvm-svn: 132912
2011-06-13 11:12:42 +00:00
Michael J. Spencer a7f9c49aab Make Binary the parent of ObjectFile and update children to new interface.
llvm-svn: 132911
2011-06-13 11:12:33 +00:00
Eli Friedman 2378cacae3 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.
llvm-svn: 132695
2011-06-06 22:45:46 +00:00
Eli Friedman b68fe25e3e We only do always-inlining at -O1; make opt reflect that.
llvm-svn: 132693
2011-06-06 22:13:27 +00:00
Nick Lewycky 42bdfc0708 Also remove -lLTO which should have been in r132349. I failed to apply this
from David Meyer's patch!

llvm-svn: 132352
2011-05-31 20:00:45 +00:00
Nick Lewycky a0484fcef1 Make the gold plugin build on Cygwin as well as Linux. Patch by David Meyer!
llvm-svn: 132349
2011-05-31 19:53:26 +00:00
Evan Cheng a3b4203cbc Remove dead option.
llvm-svn: 131947
2011-05-24 01:43:38 +00:00
Chris Lattner ef8cf6d421 initialize and finalize function passes, pointed out by Cameron.
llvm-svn: 131843
2011-05-22 06:44:19 +00:00
Chris Lattner 4f12f11517 fix a file system case sensitivity issue.
llvm-svn: 131828
2011-05-22 00:37:51 +00:00
Chris Lattner 3d70addad7 switch opt to using PassManagerBuilder.h
llvm-svn: 131824
2011-05-22 00:21:33 +00:00
Chris Lattner ac99108d36 switch llvm-ld. It has a terrible mechanism that people can add extra
passes, it should be converted to use extension points.

llvm-svn: 131823
2011-05-22 00:21:15 +00:00
Chris Lattner f200a0af58 switch bugpoint and liblto to PassManagerBuilder.
llvm-svn: 131821
2011-05-22 00:20:07 +00:00
Andrew Trick d5d0764b3b Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.

llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Oscar Fuentes a4445d6a51 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!

llvm-svn: 131229
2011-05-12 11:26:21 +00:00
Andrew Trick 69005e5953 Typo and missing checkin from r131186.
llvm-svn: 131187
2011-05-11 16:44:08 +00:00
Andrew Trick 55aeb55aa3 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.

llvm-svn: 131186
2011-05-11 16:31:24 +00:00
Jim Grosbach 112a2de78c Tidy up. 80-column and whitespace.
llvm-svn: 131094
2011-05-09 20:05:25 +00:00
Duncan Sands 9aa54fef84 Remove an unused variable.
llvm-svn: 130860
2011-05-04 19:13:01 +00:00
Rafael Espindola 7219831894 llvmc: Pass -disable-cfi to llc.
llvm-svn: 130712
2011-05-02 19:45:24 +00:00
Rafael Espindola fd05785324 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.

llvm-svn: 130634
2011-05-01 03:50:49 +00:00
Rafael Espindola a3181d12c6 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.

llvm-svn: 130587
2011-04-30 03:44:37 +00:00
Chandler Carruth 3f7b581e2f Revert an unintended commit. Very sorry for this one.
llvm-svn: 130393
2011-04-28 08:18:22 +00:00
Chandler Carruth e63a7b21f6 nuke gold
llvm-svn: 130391
2011-04-28 08:17:05 +00:00
Mikhail Glushenkov f08209382a Remove all references to plugins from the LLVMC docs.
llvm-svn: 130090
2011-04-24 14:17:32 +00:00
Jay Foad 1a180156b6 Remove unused STL header includes.
llvm-svn: 130068
2011-04-23 19:53:52 +00:00
Mikhail Glushenkov 91956aba03 The .inc file is auto-generated and must not be edited by hand.
llvm-svn: 130021
2011-04-22 22:05:29 +00:00
Rafael Espindola 6aea59268a Remove unused argument.
llvm-svn: 129955
2011-04-21 23:39:26 +00:00
Nick Lewycky 364c04ae01 Fix typo in comment.
llvm-svn: 129902
2011-04-21 01:54:08 +00:00
Daniel Dunbar c7f2f14478 llc: Fix a refacto, .loc support didn't work before 10.6.
llvm-svn: 129841
2011-04-20 00:47:19 +00:00
Daniel Dunbar cd01ed5bd6 ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OS
triple component.

llvm-svn: 129838
2011-04-20 00:14:25 +00:00
Daniel Dunbar 2b9b0e3748 ADT/Triple: Move a variety of clients to using isOSDarwin() and isOSWindows()
predicates.

llvm-svn: 129816
2011-04-19 21:14:45 +00:00
Daniel Dunbar ed3d5496dc llc: Eliminate a use of getDarwinMajorNumber().
- As before, there is a minor semantic change here (evidenced by the test
   change) for Darwin triples that have no version component. I debated changing
   the default behavior of isOSVersionLT, but decided it made more sense for
   triples to be explicit.

llvm-svn: 129805
2011-04-19 20:46:13 +00:00