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

16829 Commits

Author SHA1 Message Date
Michael Ilseman
e50da24007 Fast-math interfaces for Instructions
Add in getter/setter methods for Instructions, allowing them to be the interface to FPMathOperator similarly to now NUS/NSW is handled.

llvm-svn: 168642
2012-11-27 00:41:22 +00:00
Michael Ilseman
20592e9395 Fast-math flags added to FPMathOperator.
Created FastMathFlags convenience struct for the getting and setting of fast-math flags en masse. Added SubclassOptionalData bitfields and corresponding getters/setters to FPMathOperator for the various fast-math flags.

llvm-svn: 168641
2012-11-27 00:40:00 +00:00
Owen Anderson
4f32762479 Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model
Patch by Pedro Artigas, with feedback from by Chandler Carruth.

llvm-svn: 168635
2012-11-26 23:54:47 +00:00
Benjamin Kramer
2cd9913ab9 Decouple MCInstBuilder from the streamer per Eli's request.
llvm-svn: 168597
2012-11-26 18:05:52 +00:00
Benjamin Kramer
8f414c9010 Add MCInstBuilder, a utility class to simplify MCInst creation similar to MachineInstrBuilder.
Simplify some repetitive code with it. No functionality change.

llvm-svn: 168587
2012-11-26 13:34:22 +00:00
Joe Abbey
87ea4ece75 Code Custodian:
- Widespread trailing space removal
  - A dash of OCD spacing to block align enums
  - joined a line that probably needed 80 cols a while back

llvm-svn: 168566
2012-11-25 15:23:39 +00:00
Rafael Espindola
81ee486113 Add support for .cfi_register now that it is easy to extent the representation
to support it. Original patch with the parsing and plumbing by the PaX team and
Roman Divacky. I added the bits in MCDwarf.cpp and the test.

llvm-svn: 168565
2012-11-25 15:14:49 +00:00
Rafael Espindola
9e5a89375e Further cleanups. Thanks for Sean Silva for noticing it.
llvm-svn: 168556
2012-11-25 02:50:32 +00:00
Craig Topper
aecc69f522 Add an extra slash so doxygen comments will be properly recognized.
llvm-svn: 168554
2012-11-25 00:59:59 +00:00
Benjamin Kramer
349eb891a6 libLTO: Add a utility method to initialize the disassemblers.
Necessary to give disassembler users (like darwin's otool) a possibility to
dlopen libLTO and still initialize the required LLVM bits. This used to go
through libMCDisassembler but that's a gross layering violation, the MC layer
can't pull in functions from the targets. Adding a function to libLTO is a bit
of a hack but not worse than exposing other disassembler bits from libLTO.

Fixes PR14362.

llvm-svn: 168545
2012-11-24 16:59:10 +00:00
Rafael Espindola
6ac5a44d45 Change the representation of MCCFIInstruction.
We now store the Register and Offset directly. MachineLocation is gone (from
this file)!

llvm-svn: 168536
2012-11-24 04:33:48 +00:00
Rafael Espindola
0291ef94b9 Give each MCCFIInstruction its own opcode.
This untangles the switch cases of the old Move and RelMove opcodes a bit
and makes it clear how to add new instructions.

llvm-svn: 168534
2012-11-24 03:10:54 +00:00
Rafael Espindola
f8d9d5032b Move a bit of duplicated code into a helper function.
llvm-svn: 168533
2012-11-24 02:18:49 +00:00
Rafael Espindola
edc8307796 Refactor how MCCFIInstructions are created.
Give MCCFIInstruction a single, private constructor and add helper static
methods that create each type of cfi instruction. This is is preparation
for changing its representation. The representation with a pair
MachineLocations older than MC and has been abused quiet a bit to support
more cfi instructions.

llvm-svn: 168532
2012-11-24 02:01:08 +00:00
Rafael Espindola
a6e1d5393f Implement .cfi_undefined. Based on a patch from PaX team, updated by
Roman Divacky. I just added the testcase.

llvm-svn: 168520
2012-11-23 16:59:41 +00:00
Joey Gouly
e5caa7eb3e Remove unused parameter Penalty from the BoundsChecking pass.
llvm-svn: 168511
2012-11-23 10:47:35 +00:00
Meador Inge
9397e14bdb Add more functions to the target library information.
I discovered a few more missing functions while migrating optimizations
from the simplify-libcalls pass to the instcombine (I already added some
in r167659).

llvm-svn: 168501
2012-11-22 15:36:42 +00:00
Akira Hatanaka
89ebdb5e78 Add relocations used for mips big GOT.
llvm-svn: 168448
2012-11-21 19:50:22 +00:00
Preston Briggs
f98e42b853 test commit: added a few comments
llvm-svn: 168445
2012-11-21 18:53:19 +00:00
Sebastian Pop
b6541f52ee removes a few "const" qualifiers
so that I can (someday) call SE->getSCEV without complaint.
No semantic change intended.

Patch from Preston Briggs <preston.briggs@gmail.com>.

llvm-svn: 168391
2012-11-20 22:28:04 +00:00
Eric Christopher
760b5f1eb8 Remove some dead code.
llvm-svn: 168374
2012-11-20 18:37:40 +00:00
Chandler Carruth
f6c8834e87 Fix a place where the declaration didn't use LLVM_ENABLE_DUMP but the
definition did.

The last part of PR14324.

llvm-svn: 168363
2012-11-20 10:23:50 +00:00
Tim Northover
3556e52a02 Fix physical register liveness calculations:
+ Take account of clobbers
+ Give outputs priority over inputs since they happen later.

llvm-svn: 168360
2012-11-20 09:56:11 +00:00
Bill Wendling
62a846033f Make the AttrListPtr object a part of the LLVMContext.
When code deletes the context, the AttributeImpls that the AttrListPtr points to
are now invalid. Therefore, instead of keeping a separate managed static for the
AttrListPtrs that's reference counted, move it into the LLVMContext and delete
it when deleting the AttributeImpls.

llvm-svn: 168354
2012-11-20 05:09:20 +00:00
Eric Christopher
88ccedb94c 80-column and whitespace fixups.
llvm-svn: 168344
2012-11-20 00:15:36 +00:00
Sean Silva
e0e760dc93 Allow using MemoryBuffers with yaml::Stream directly.
The rationale is to get YAML filenames in diagnostics from
yaml::Stream::printError -- currently the filename is hard-coded as
"YAML" because there's no buffer information available.

Patch by Kim Gräsman!

llvm-svn: 168341
2012-11-19 23:21:47 +00:00
Eric Christopher
9c2055893d Remove a function argument and propagate const around accordingly.
llvm-svn: 168338
2012-11-19 22:42:15 +00:00
NAKAMURA Takumi
7652190f5b Promote the constant 1 to long long, 1LL or 1ULL in int64_t-sensitive context.
llvm-svn: 168304
2012-11-19 10:03:09 +00:00
Bob Wilson
bcc1a33cb5 Clean up handling of always-inline functions in the inliner.
This patch moves the isInlineViable function from the InlineAlways pass into
the InlineCostAnalyzer and then changes the InlineCost computation to use that
simple check for always-inline functions. All the special-case checks for
AlwaysInline in the CallAnalyzer can then go away.

llvm-svn: 168300
2012-11-19 07:04:35 +00:00
Bob Wilson
19b846be19 Some comment fixes.
llvm-svn: 168299
2012-11-19 07:04:30 +00:00
James Molloy
b1ffdf919e Typo
llvm-svn: 168263
2012-11-17 17:59:44 +00:00
James Molloy
0915ec1560 Add a new function to ConstantExpr - getAsInstruction. This returns its Instruction* corollary, which may be useful if a user
wishes to transform a ConstantExpr so that one of its operands is no longer constant.

llvm-svn: 168262
2012-11-17 17:56:30 +00:00
Eric Christopher
44d69c50b0 Add constant definitions for fission dwarf attributes, forms, etc.
llvm-svn: 168218
2012-11-16 23:04:31 +00:00
Benjamin Kramer
a95ac74327 Remove default public copy ctors.
They are just useless and prevent SmallVector from picking an optimized codepath
for memcpyable elements.

llvm-svn: 168211
2012-11-16 22:22:20 +00:00
Jakub Staszak
b67f9f031d Remove trailing spaces.
llvm-svn: 168208
2012-11-16 22:07:00 +00:00
Andrew Trick
7d2e755625 typo
llvm-svn: 168202
2012-11-16 21:33:35 +00:00
Benjamin Kramer
9cc1f23013 Work around a layering violation from Target to CodeGen.
Technically this is still a layering violation but it's header-only which makes
it less harmful. No functionality change.

llvm-svn: 168173
2012-11-16 17:32:33 +00:00
Duncan Sands
98b6a4f4b5 Add the Erlang/HiPE calling convention, patch by Yiannis Tsiouris.
llvm-svn: 168166
2012-11-16 12:36:39 +00:00
Andrew Kaylor
bf5ce8a2b0 Interface changes to allow RuntimeDyld memory managers to set memory permissions after an object has been loaded.
llvm-svn: 168114
2012-11-15 23:50:01 +00:00
Michael Ilseman
78572d24dd Remove trailing whitespace
llvm-svn: 168103
2012-11-15 22:34:00 +00:00
Chad Rosier
5bb777b447 [reg scavenger] Fix the isUsed/isAliasUsed functions so as to not report a false
positive.

In this particular case, R6 was being spilled by the register scavenger when it
was in fact dead.  The isUsed function reported R6 as used because the R6_R7
alias was reserved (due to the fact that we've reserved R7 as the FP).  The
solution is to only check if the original register (i.e., R6) isReserved and
not the aliases.  The aliases are only checked to make sure they're available.

The test case is derived from one of the nightly tester benchmarks and is rather
intractable and difficult to reproduce, so I haven't included it.
rdar://12592448

llvm-svn: 168054
2012-11-15 18:13:20 +00:00
Sergei Larin
28dc2b4383 Fix indeterminism in MI scheduler DAG construction.
Similarly to several recent fixes throughout the code replace std::map use with the MapVector.
Add find() method to the MapVector.

llvm-svn: 168051
2012-11-15 17:45:50 +00:00
Dmitri Gribenko
610d06f00e Use empty parens for empty function parameter list instead of '(void)'.
llvm-svn: 168049
2012-11-15 16:51:49 +00:00
Duncan Sands
4393e1400e Do not handle void types in DataLayout. Patch by Patrick Hägglund.
llvm-svn: 168042
2012-11-15 14:45:30 +00:00
Hans Wennborg
73c4bb7fcb Make GlobalOpt be conservative with TLS variables (PR14309)
For global variables that get the same value stored into them
everywhere, GlobalOpt will replace them with a constant. The problem is
that a thread-local GlobalVariable looks like one value (the address of
the TLS var), but is different between threads.

This patch introduces Constant::isThreadDependent() which returns true
for thread-local variables and constants which depend on them (e.g. a GEP
into a thread-local array), and teaches GlobalOpt not to track such
values.

llvm-svn: 168037
2012-11-15 11:40:00 +00:00
Guy Benyei
04ae9963a3 Add support for SPIR64 target - the 64bit counterpart of SPIR.
The new OpenCL SPIR extension spec will define separate SPIR for 32 and 64 bit architectures.

llvm-svn: 168036
2012-11-15 10:35:47 +00:00
Craig Topper
216a5138e7 Add llvm.ceil, llvm.trunc, llvm.rint, llvm.nearbyint intrinsics.
llvm-svn: 168025
2012-11-15 06:51:10 +00:00
Jakub Staszak
5c1af96255 Use LLVM_DELETED_FUNCTION.
llvm-svn: 168009
2012-11-15 00:25:36 +00:00
Owen Anderson
c7fb54baff Add doInitialization and doFinalization methods to ModulePass's, to allow them to be re-initialized and reused on multiple Module's.
Patch by Pedro Artigas.

llvm-svn: 168008
2012-11-15 00:14:15 +00:00
Eric Christopher
caf5a23d81 Remove the CellSPU port.
Approved by Chris Lattner.

llvm-svn: 167984
2012-11-14 22:09:20 +00:00