1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

304 Commits

Author SHA1 Message Date
Bill Wendling
ea61af7ff2 Hack the hack. If we have a situation where an ASM object is defined but isn't
reflected in the LLVM IR (as a declare or something), then treat it like a data
object.

N.B. This isn't 100% correct. The ASM parser should supply more information so
that we know what type of object it is, and what attributes it should have.

llvm-svn: 153870
2012-04-02 10:01:21 +00:00
Bill Wendling
8ee5b8754f It could come about that we parse the inline ASM before we get a potential
definition for it. In that case, we want to wait for the potential definition
before we create a symbol for it.

llvm-svn: 153859
2012-04-02 03:33:31 +00:00
Bill Wendling
c0128a5e70 Move trivial functions into the class definition.
llvm-svn: 153810
2012-03-31 11:25:18 +00:00
Bill Wendling
42a700ea8a Trim headers.
llvm-svn: 153809
2012-03-31 11:22:30 +00:00
Bill Wendling
73b6dfb5c9 Indent according to LLVM's style guide.
llvm-svn: 153808
2012-03-31 11:15:43 +00:00
Bill Wendling
9850d17689 Cleanup whitespace and trim some of the #includes.
llvm-svn: 153807
2012-03-31 11:10:35 +00:00
Bill Wendling
3ca3830022 These strings aren't 'const char *' but 'char *'.
llvm-svn: 153805
2012-03-31 10:51:45 +00:00
Bill Wendling
8e34c4eea6 Cleanup whitespace.
llvm-svn: 153804
2012-03-31 10:50:14 +00:00
Bill Wendling
a8d55bf5e5 Free the codegen options when deleting LTO code generator object.
llvm-svn: 153803
2012-03-31 10:49:43 +00:00
Bill Wendling
cbcec066af Cleanup whitespace and remove unneeded 'extern' keyword on function definitions.
llvm-svn: 153802
2012-03-31 10:44:20 +00:00
Bill Wendling
188c9214c3 * Set the scope attributes for the ASM symbol we added to be the value passed
into the function.
* Reorder some header files.

llvm-svn: 153783
2012-03-30 23:26:06 +00:00
Bill Wendling
619da9f4da Cleanup whitespace. Doxygenize comments. And indent to llvm coding standards.
llvm-svn: 153740
2012-03-30 10:29:38 +00:00
Bill Wendling
88a497a1a9 Make some headway towards compiling all of LLVM.
Module-level ASM may contain definitions of functions and globals. However, we
were not telling the linker that these globals had definitions. As far as it was
concerned, they were just declarations.

Attempt to resolve this by inserting module-level ASM functions and globals into
the '_symbol' set so that the linker will know that they have values.

This gets us further towards our goal of compiling LLVM, but it still has
problems when linking libLTO.dylib because of the `-dead_strip' flag that's
passed to the linker.

<rdar://problem/11124216>

llvm-svn: 153638
2012-03-29 08:27:32 +00:00
Bill Wendling
55bef2d34a Cleanup whitespace.
llvm-svn: 153634
2012-03-29 04:28:00 +00:00
Bill Wendling
21b86c9017 Cache the end() iterator.
llvm-svn: 153632
2012-03-29 03:34:57 +00:00
Bill Wendling
591cf2fd07 Cleanup some whitespaces.
llvm-svn: 153612
2012-03-28 23:12:18 +00:00
Bill Wendling
02297eee5b Inline function into its one caller.
llvm-svn: 153598
2012-03-28 20:48:49 +00:00
Bill Wendling
3f5e3c9839 Reformat the LTOModule code to be more inline with LLVM's coding standards. Add
a bunch of comments for the various functions. No intended functionality change.

llvm-svn: 153595
2012-03-28 20:46:54 +00:00
Bill Wendling
853517869b Some whitespace cleanup.
llvm-svn: 153567
2012-03-28 04:17:34 +00:00
Chris Lattner
9782adedd7 reapply the patches reverted in r149470 that reenable ConstantDataArray,
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul.  Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.

llvm-svn: 149800
2012-02-05 02:29:43 +00:00
Argyrios Kyrtzidis
492f34016f Revert Chris' commits up to r149348 that started causing VMCoreTests unit test to fail.
These are:

r149348
r149351
r149352
r149354
r149356
r149357
r149361
r149362
r149364
r149365

llvm-svn: 149470
2012-02-01 04:51:17 +00:00
Hal Finkel
8cf5de5774 Add a basic-block autovectorization pass.
This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure.
Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser).

llvm-svn: 149468
2012-02-01 03:51:43 +00:00
Chris Lattner
3359d8c044 update this to ConstantDataArray. There are no tests and this isn't using the preferred functionality for ripping apart strings, so I have no way to test this.
llvm-svn: 149361
2012-01-31 06:03:46 +00:00
Jim Grosbach
6280a1137f Better diagnostic for malformed .org assembly directive.
Provide source line number information.

llvm-svn: 149101
2012-01-27 00:37:08 +00:00
David Blaikie
06ecc99a56 More dead code removal (using -Wunreachable-code)
llvm-svn: 148578
2012-01-20 21:51:11 +00:00
Rafael Espindola
2d545fa143 Split Finish into Finish and FinishImpl to have a common place to do end of
file error checking. Use that to error on an unfinished cfi_startproc.

The error is not nice, but is already better than a segmentation fault.

llvm-svn: 147717
2012-01-07 03:13:18 +00:00
Nick Lewycky
7d0d3c2d58 Move global variables in TargetMachine into new TargetOptions class. As an API
change, now you need a TargetOptions object to create a TargetMachine. Clang
patch to follow.

One small functionality change in PTX. PTX had commented out the machine
verifier parts in their copy of printAndVerify. That now calls the version in
LLVMTargetMachine. Users of PTX who need verification disabled should rely on
not passing the command-line flag to enable it.

llvm-svn: 145714
2011-12-02 22:16:29 +00:00
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
Bill Wendling
83f7f41d72 Reformatting changes to get rid of blank lines, put code on one line, and to
decrease some code indentation. No intended functional changes.

llvm-svn: 143723
2011-11-04 18:48:00 +00:00
Bill Wendling
510b538e32 Move comment to the correct place.
llvm-svn: 143690
2011-11-04 09:34:06 +00:00
Bill Wendling
c339c04e2e Make the Mangler an ivar so that it doesn't have to be passed around everywhere.
llvm-svn: 143689
2011-11-04 09:30:19 +00:00
Bill Wendling
2d3ef29584 Refactor the MCContext so that it's an ivar instead of a local which is passed
around. This is important for some future work as well.

llvm-svn: 143688
2011-11-04 09:24:40 +00:00
Sebastian Pop
f72a853709 rename getHostTriple into getDefaultTargetTriple
llvm-svn: 143502
2011-11-01 21:32:20 +00:00
Daniel Dunbar
81780d9982 build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
new all-targets pseudo-component.

llvm-svn: 142401
2011-10-18 19:27:24 +00:00
Ivan Krasin
2f2f63807f lto/addAsmGlobalSymbols: fast path when no module level asm is present.
llvm-svn: 139284
2011-09-08 07:38:25 +00:00
Ivan Krasin
6d62a9f1b3 lto/addAsmGlobalSymbols: fail fracefully when the target does not define AsmParser.
llvm-svn: 139283
2011-09-08 07:36:39 +00:00
Benjamin Kramer
bd939ad83e Don't drop alignment info on local common symbols.
- On COFF the .lcomm directive has an alignment argument.
- On ELF we fall back to .local + .comm

Based on a patch by NAKAMURA Takumi.

Fixes PR9337, PR9483 and PR10128.

llvm-svn: 138976
2011-09-01 23:04:27 +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
Jim Grosbach
a9a0c62719 Remove unused Target argument from AsmParser construction methods.
The argument is unused, and is a layering violation in any case.

llvm-svn: 137735
2011-08-16 18:33:49 +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
Evan Cheng
2e96785311 Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser.
llvm-svn: 136027
2011-07-26 00:24:13 +00:00
Nick Lewycky
a76f4792e3 Fix typo.
llvm-svn: 135971
2011-07-25 21:12:44 +00:00
Evan Cheng
13d54fc7c9 Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where they belong.
llvm-svn: 135833
2011-07-23 00:45:41 +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