Peter Collingbourne
42ebc937cb
Now that the linker supports lazily materialising globals, don't
...
materialise them in LTO.
I observed a ~0.5-1% speedup for an LTO link of opt.
llvm-svn: 143784
2011-11-05 04:17:25 +00:00
Sebastian Pop
f72a853709
rename getHostTriple into getDefaultTargetTriple
...
llvm-svn: 143502
2011-11-01 21:32:20 +00:00
Evan Cheng
420bf5446c
Move TargetRegistry and TargetSelect from Target to Support where they belong.
...
These are strictly utilities for registering targets and components.
llvm-svn: 138450
2011-08-24 18:08:43 +00:00
John Criswell
6df53156ad
Fixed compilation warning on Linux by fixing the type of a return value.
...
llvm-svn: 137913
2011-08-18 01:19:05 +00:00
Rafael Espindola
2b0d064f3b
Move methods in PassManagerBuilder offline.
...
llvm-svn: 136727
2011-08-02 21:50:27 +00:00
Rafael Espindola
73efcf56f6
move PassManagerBuilder.h to IPO. This is a non intuitive place to put it,
...
but it solves a layering violation since things in Support are not supposed to
use things in Transforms.
llvm-svn: 136726
2011-08-02 21:50:24 +00:00
Nick Lewycky
a76f4792e3
Fix typo.
...
llvm-svn: 135971
2011-07-25 21:12:44 +00:00
Evan Cheng
7b4cb12a95
Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
...
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.
llvm-svn: 135812
2011-07-22 21:58:54 +00:00
Evan Cheng
c9bc5a9011
Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.
...
There is still a bit more refactoring left to do in Targets. But we are now very
close to fixing all the layering issues in MC.
llvm-svn: 135611
2011-07-20 19:50:42 +00:00
Evan Cheng
380dc98371
Add MCObjectFileInfo and sink the MCSections initialization code from
...
TargetLoweringObjectFileImpl down to MCObjectFileInfo.
TargetAsmInfo is done to one last method. It's *almost* gone!
llvm-svn: 135569
2011-07-20 05:58:47 +00:00
Evan Cheng
bfc0cac54d
Introduce MCCodeGenInfo, which keeps information that can affect codegen
...
(including compilation, assembly). Move relocation model Reloc::Model from
TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine.
llvm-svn: 135468
2011-07-19 06:37:02 +00:00
Evan Cheng
561d71ce7b
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
...
to MCRegisterInfo. Also initialize the mapping at construction time.
This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step
towards fixing the layering violation.
llvm-svn: 135424
2011-07-18 20:57:22 +00:00
Chris Lattner
e1fe7061ce
land David Blaikie's patch to de-constify Type, with a few tweaks.
...
llvm-svn: 135375
2011-07-18 04:54:35 +00:00
Evan Cheng
9e8f90a020
Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
...
llvm-svn: 135219
2011-07-14 23:50:31 +00:00
Cameron Zwarich
583fdfe4ff
Fix LTO after the recent MC subtarget refactoring.
...
llvm-svn: 134930
2011-07-11 22:19:51 +00:00
Evan Cheng
034261674b
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
b4dc8bdd22
Sink SubtargetFeature and TargetInstrItineraries (renamed MCInstrItineraries) into MC.
...
llvm-svn: 134049
2011-06-29 01:14:12 +00:00
Chris Lattner
89036e6501
switch bugpoint and liblto to PassManagerBuilder.
...
llvm-svn: 131821
2011-05-22 00:20:07 +00:00
Rafael Espindola
1592f3ae24
Add a lto_codegen_compile_to_file to avoid producing a file, reading it to
...
memory and writing it back to disk.
llvm-svn: 128108
2011-03-22 20:57:13 +00:00
Rafael Espindola
9e0fcfc02b
We don't need a null terminator for the output file.
...
llvm-svn: 128098
2011-03-22 19:20:47 +00:00
Rafael Espindola
b0fe115914
Use lazy parsing in LTO. Unfortunately this is only a 3% time saving for
...
'ar'. Have to figure out how to make libLTO even lazier.
llvm-svn: 127901
2011-03-18 19:51:00 +00:00
Rafael Espindola
7f301833ee
Add a special streamer to libLTO that just records symbols definitions and
...
uses.
The result produced by the streamer is used to give the linker more accurate
information and to add to llvm.compiler.used. The second improvement removes
the need for the user to add __attribute__((used)) to functions only used in
inline asm. The first one lets us build firefox with LTO on Darwin :-)
llvm-svn: 126830
2011-03-02 04:14:42 +00:00
Rafael Espindola
58423e8aad
Switch LTO to use MC. This takes the linking of libxul.so from about 7m to
...
6m30.
llvm-svn: 126426
2011-02-24 21:04:06 +00:00
Rafael Espindola
5a77325398
Fix some memory leaks and avoid looking in the hash tables twice.
...
libxul links in 7m0.403s.
llvm-svn: 126085
2011-02-20 16:27:25 +00:00
Rafael Espindola
d3124f22fd
Preserve aliases if needed.
...
llvm-svn: 125439
2011-02-12 18:03:13 +00:00
Rafael Espindola
1f29f4f844
Fix a silly bug I introduced when dropping std::string.
...
llvm-svn: 125420
2011-02-12 00:19:56 +00:00
Rafael Espindola
bb94ca00f7
Remove std::string version of getNameWithPrefix.
...
llvm-svn: 125363
2011-02-11 05:23:09 +00:00
Michael J. Spencer
86f6a9ac6e
MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> via an out parm.
...
llvm-svn: 121958
2010-12-16 03:29:14 +00:00
Rafael Espindola
0e665e502d
Fixed version of 121434 with no new memory leaks.
...
llvm-svn: 121471
2010-12-10 07:39:47 +00:00
Rafael Espindola
011e168728
Revert my previous patch to make the valgrind bots happy.
...
llvm-svn: 121461
2010-12-10 04:01:09 +00:00
Rafael Espindola
03ad1e8f1f
Initial support for the cfi directives. This is just enough to get
...
f:
.cfi_startproc
nop
.cfi_endproc
assembled (on ELF).
llvm-svn: 121434
2010-12-09 23:48:29 +00:00
Michael J. Spencer
1b2e087ff3
More code not compiled by CMake. :(.
...
llvm-svn: 121387
2010-12-09 18:06:07 +00:00
Devang Patel
a4d6774cf8
Do not try luck by using given name to create temporary file. In parallel builds it may not work.
...
This time for .s file.
llvm-svn: 121016
2010-12-06 18:04:39 +00:00
Devang Patel
686e9faa6d
Do not try luck by using given name to create temporary file. In parallel builds it may not work.
...
llvm-svn: 120860
2010-12-03 23:58:31 +00:00
Michael J. Spencer
4a63404543
I swear I did a make clean and make before committing all this...
...
llvm-svn: 120304
2010-11-29 18:47:54 +00:00
Dan Gohman
b41a554403
This file needs ToolOutputFile.h too.
...
llvm-svn: 115976
2010-10-07 20:48:46 +00:00
Dan Gohman
f9e09104f1
Make tool_output_file's raw_ostream instance a member variable instead
...
of a base class.
This makes it possible to unregister the file from FilesToRemove when
the file is done. Also, this eliminates the need for
formatted_tool_output_file.
llvm-svn: 112706
2010-09-01 14:20:41 +00:00
Dan Gohman
d8be4c4aca
Convert tools to use tool_output_file, and introduce error
...
checking to places which previously lacked it.
llvm-svn: 111651
2010-08-20 16:59:15 +00:00
Rafael Espindola
f345661269
Make it possible to set the cpu used for codegen.
...
llvm-svn: 110759
2010-08-11 00:15:13 +00:00
Rafael Espindola
c61143ae75
Make it possible to set the flags passed to the assembler.
...
Nick, please review.
llvm-svn: 110705
2010-08-10 18:55:09 +00:00
Dan Gohman
6163340daf
Eliminate some unnessary Path::exists() calls.
...
llvm-svn: 104888
2010-05-27 20:51:54 +00:00
Dan Gohman
35206e98e6
When handling raw_ostream errors manually, use clear_error() so that
...
raw_ostream doesn't try to do its own error handling.
Also, close the raw_ostream before checking for errors so that any
errors that occur during closing are caught by the manual check.
llvm-svn: 104882
2010-05-27 20:19:47 +00:00
Bill Wendling
ed91169004
The getDefaultSubtargetFeatures method of SubtargetFeature did actually return a
...
string of features for that target. However LTO was using that string to pass
into the "create target machine" stuff. That stuff needed the feature string to
be in a particular form. In particular, it needed the CPU specified first and
then the attributes. If there isn't a CPU specified, it required it to be blank
-- e.g., ",+altivec". Yuck.
Modify the getDefaultSubtargetFeatures method to be a non-static member
function. For all attributes for a specific subtarget, it will add them in like
normal. It will also take a CPU string so that it can satisfy this horrible
syntax.
llvm-svn: 103451
2010-05-11 00:30:02 +00:00
Duncan Sands
153ad3b903
Remove the -enable-sjlj-eh option, which doesn't do anything.
...
Remove the -enable-eh option which is only used by the JIT,
and replace it with -jit-enable-eh.
llvm-svn: 102865
2010-05-02 15:36:26 +00:00
Bill Wendling
8a16d236db
r98363 deleted a '!' when cleaning up whitespace. This caused globals which are
...
*not* declarations to *not* be placed in the "preserve" list.
<rdar://problem/7870735>
llvm-svn: 102405
2010-04-27 00:55:25 +00:00
Dan Gohman
b66acedc8a
Fix more -Wcast-qual warnings.
...
llvm-svn: 101656
2010-04-17 17:44:03 +00:00
Dan Gohman
7f76052c8c
Trim #includes.
...
llvm-svn: 99416
2010-03-24 19:56:17 +00:00
Chris Lattner
c101ad818c
give Mangler access to TargetData.
...
llvm-svn: 98378
2010-03-12 20:47:28 +00:00
Chris Lattner
956582f876
make the mangler take an MCContext instead of an MAI.
...
No functionality change.
llvm-svn: 98363
2010-03-12 18:44:54 +00:00
Chris Lattner
e8811c3222
change addPassesToEmitFile to return true on failure instead of its input,
...
add -filetype=null for performance testing and remove -filetype=dynlib,
which isn't planned to be implemented.
llvm-svn: 95202
2010-02-03 05:55:08 +00:00