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

16700 Commits

Author SHA1 Message Date
Bill Wendling
f2fff93263 Add an enum for the return and function indexes into the AttrListPtr object. This gets rid of some magic numbers.
llvm-svn: 165924
2012-10-15 07:29:08 +00:00
Bill Wendling
5fb56f15bd Use a ::get method to create the attribute from Attributes::AttrVals instead of a constructor.
llvm-svn: 165923
2012-10-15 06:53:28 +00:00
Bill Wendling
71e3fa6c01 Supply a default 'operator=' method.
llvm-svn: 165922
2012-10-15 06:34:18 +00:00
Bill Wendling
213dd167bc Move the AttributesImpl header file into the VMCore directory so that it can be opaque.
llvm-svn: 165920
2012-10-15 05:40:12 +00:00
Bill Wendling
a77399599d Attributes Rewrite
Convert the internal representation of the Attributes class into a pointer to an
opaque object that's uniqued by and stored in the LLVMContext object. The
Attributes class then becomes a thin wrapper around this opaque
object. Eventually, the internal representation will be expanded to include
attributes that represent code generation options, etc.

llvm-svn: 165917
2012-10-15 04:46:55 +00:00
Benjamin Kramer
25522ac16c Fix a typo that made ImmutableMap::getMaxElement() useless.
Add a basic unit test for ImmutableMap. Found by inspection.

llvm-svn: 165907
2012-10-14 15:56:39 +00:00
Bill Wendling
3ce41738d8 Remove dead methods.
llvm-svn: 165902
2012-10-14 09:21:44 +00:00
Bill Wendling
ea777202df Remove operator cast method in favor of querying with the correct method.
llvm-svn: 165899
2012-10-14 08:54:26 +00:00
Bill Wendling
7005388897 Remove the bitwise AND operators from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165896
2012-10-14 07:52:48 +00:00
Bill Wendling
03d1b8ef4c Remove the bitwise assignment OR operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165895
2012-10-14 07:35:59 +00:00
Bill Wendling
c04d329902 Remove the bitwise OR operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165894
2012-10-14 07:17:34 +00:00
Bill Wendling
ea1286d8bf Remove the bitwise XOR operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165893
2012-10-14 06:56:13 +00:00
Bill Wendling
1dc6f7739b Remove the bitwise NOT operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165892
2012-10-14 06:39:53 +00:00
Bill Wendling
2a54428ca9 Decode the LLVM attributes from bitcode using the attributes builder.
llvm-svn: 165891
2012-10-14 04:10:01 +00:00
Bill Wendling
5eda1106ff Use builder to create alignment attributes. Remove dead function.
llvm-svn: 165890
2012-10-14 03:58:29 +00:00
Bill Wendling
0bbe1f34e1 Remove dead method.
llvm-svn: 165889
2012-10-14 03:28:43 +00:00
Meador Inge
0d4d368820 Implement new LibCallSimplifier class
This patch implements the new LibCallSimplifier class as outlined in [1].
In addition to providing the new base library simplification infrastructure,
all the fortified library call simplifications were moved over to the new
infrastructure.  The rest of the library simplification optimizations will
be moved over with follow up patches.

NOTE: The original fortified library call simplifier located in the
SimplifyFortifiedLibCalls class was not removed because it is still
used by CodeGenPrepare.  This class will eventually go away too.

[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052283.html

llvm-svn: 165873
2012-10-13 16:45:24 +00:00
Chad Rosier
2627b4fea7 [ms-inline asm] Remove the MatchInstruction() function. Previously, this was
the interface between the front-end and the MC layer when parsing inline
assembly.  Unfortunately, this is too deep into the parsing stack. Specifically,
we're unable to handle target-independent assembly (i.e., assembly directives,
labels, etc.).  Note the MatchAndEmitInstruction() isn't the correct
abstraction either.  I'll be exposing target-independent hooks shortly, so this
is really just a cleanup.

llvm-svn: 165858
2012-10-13 00:26:04 +00:00
Chad Rosier
89e118ccda [ms-inline asm] Capitalize per coding standard.
llvm-svn: 165847
2012-10-12 23:09:25 +00:00
Chad Rosier
c8a0d67b5d [ms-inline asm] Use the new API introduced in r165830 in lieu of the
MapAndConstraints vector.  Also remove the unused Kind argument.

llvm-svn: 165833
2012-10-12 22:53:36 +00:00
Chad Rosier
00eb544d1c [ms-inline asm] Add a few data members and member functions to the
MCParsedAsmOperand class in support of ms-style inline assembly.

llvm-svn: 165830
2012-10-12 22:15:11 +00:00
Andrew Kaylor
090420fd2a Correcting enum values mentioned in comments.
Patch by Ashok Thirumurthi.

llvm-svn: 165827
2012-10-12 21:47:49 +00:00
Duncan Sands
fe6c41af6b Add powerpc-ibm-aix to Triple. Patch by Kai.
llvm-svn: 165792
2012-10-12 11:08:57 +00:00
Nick Lewycky
f5276c5683 Shuffle the virtual destructor down to the base. This should actually pacify
-Wnon-virtual-dtor for real.

llvm-svn: 165787
2012-10-12 04:28:25 +00:00
Nick Lewycky
8e62457a23 Give this class full of virtual functions a virtual destructor. Classes love
virtual destructors.

llvm-svn: 165786
2012-10-12 04:13:25 +00:00
Sean Silva
2174f713f4 Remove unnecessary classof()'s
isa<> et al. automatically infer when the cast is an upcast (including a
self-cast), so these are no longer necessary.

llvm-svn: 165767
2012-10-11 23:30:49 +00:00
Sean Silva
356281d8ad Casting.h: Automatically handle isa<Base>(Derived).
Additionally, all such cases are handled with no dynamic check.

All `classof()` of the form

    class Foo {
      [...]
      static bool classof(const Bar *) { return true; }
      [...]
    }

where Foo is an ancestor of Bar are no longer necessary.
Don't write them!

Note: The exact test is `is_base_of<Foo, Bar>`, which is non-strict, so
that Foo is considered an ancestor of itself.

This leads to the following rule of thumb for LLVM-style RTTI:

    The argument type of `classof()` should be a strict ancestor.

For more information about implementing LLVM-style RTTI, see
docs/HowToSetUpLLVMStyleRTTI.rst

llvm-svn: 165765
2012-10-11 23:30:40 +00:00
Chad Rosier
4d2473edae Remove extra semicolon.
llvm-svn: 165758
2012-10-11 22:26:44 +00:00
Micah Villmow
4eb108750d Revert 165732 for further review.
llvm-svn: 165747
2012-10-11 21:27:41 +00:00
Jan Wen Voung
fc87609127 Change encoding of instruction operands in bitcode binaries to be relative
to the instruction position.  The old encoding would give an absolute
ID which counts up within a function, and only resets at the next function.

I.e., Instead of having:

... = icmp eq i32 n-1, n-2
br i1 ..., label %bb1, label %bb2

it will now be roughly:

... = icmp eq i32 1, 2
br i1 1, label %bb1, label %bb2

This makes it so that ids remain relatively small and can be encoded
in fewer bits.

With this encoding, forward reference operands will be given
negative-valued IDs.  Use signed VBRs for the most common case
of forward references, which is phi instructions.

To retain backward compatibility we bump the bitcode version
from 0 to 1 to distinguish between the different encodings.

llvm-svn: 165739
2012-10-11 20:20:40 +00:00
Micah Villmow
d8b76fdc50 Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly.
llvm-svn: 165726
2012-10-11 17:21:41 +00:00
NAKAMURA Takumi
40d5b6690e llvm/Analysis/Passes.h: Fix copypasto in createDependenceAnalysisPass().
llvm-svn: 165709
2012-10-11 08:26:52 +00:00
Sebastian Pop
952bb51433 dependence analysis
Patch from Preston Briggs <preston.briggs@gmail.com>.

This is an updated version of the dependence-analysis patch, including an MIV
test based on Banerjee's inequalities.

It's a fairly complete implementation of the paper

    Practical Dependence Testing
    Gina Goff, Ken Kennedy, and Chau-Wen Tseng
    PLDI 1991

It cannot yet propagate constraints between coupled RDIV subscripts (discussed
in Section 5.3.2 of the paper).

It's organized as a FunctionPass with a single entry point that supports testing
for dependence between two instructions in a function. If there's no dependence,
it returns null. If there's a dependence, it returns a pointer to a Dependence
which can be queried about details (what kind of dependence, is it loop
independent, direction and distance vector entries, etc). I haven't included
every imaginable feature, but there's a good selection that should be adequate
for supporting many loop transformations. Of course, it can be extended as
necessary.

Included in the patch file are many test cases, commented with C code showing
the loops and array references.

llvm-svn: 165708
2012-10-11 07:32:34 +00:00
Bill Wendling
d56ce45fd5 Add the LLVM context to this c'tor. It will be needed in the future.
llvm-svn: 165687
2012-10-11 01:10:00 +00:00
Bill Wendling
205a5f682c Support a common idiom on how to build an Attributes class with a single attribute.
llvm-svn: 165686
2012-10-11 01:05:52 +00:00
Evan Cheng
b84fe4f16a Change MachineInstrBuilder::addDisp to copy over target flags by default.
llvm-svn: 165677
2012-10-11 00:15:48 +00:00
Eric Christopher
bcad0ec829 Formatting and 80-col.
llvm-svn: 165668
2012-10-10 22:37:01 +00:00
Nadav Rotem
b82a3821f7 Add a new interface to allow IR-level passes to access codegen-specific information.
llvm-svn: 165665
2012-10-10 22:04:55 +00:00
Sean Silva
3c3997388f tblgen: Put dyn_cast<> machinery in place for Init hierarchy.
llvm-svn: 165645
2012-10-10 20:24:40 +00:00
Bill Wendling
70fcb183a9 Remove unused argument.
llvm-svn: 165636
2012-10-10 18:02:57 +00:00
Stepan Dyatkovskiy
5182bb8695 Issue description:
SchedulerDAGInstrs::buildSchedGraph ignores dependencies between FixedStack
objects and byval parameters. So loading byval parameters from stack may be
inserted *before* it will be stored, since these operations are treated as
independent.

Fix:
Currently ARMTargetLowering::LowerFormalArguments saves byval registers with
FixedStack MachinePointerInfo. To fix the problem we need to store byval
registers with MachinePointerInfo referenced to first the "byval" parameter.

Also commit adds two new fields to the InputArg structure: Function's argument
index and InputArg's part offset in bytes relative to the start position of
Function's argument. E.g.: If function's argument is 128 bit width and it was
splitted onto 32 bit regs, then we got 4 InputArg structs with same arg index,
but different offset values. 

llvm-svn: 165616
2012-10-10 11:37:36 +00:00
Bill Wendling
196ccddf1b Cleanup. Get rid of now dead code.
llvm-svn: 165613
2012-10-10 08:03:34 +00:00
Bill Wendling
f3c4f64b79 Remove the final bits of Attributes being declared in the Attribute
namespace. Use the attribute's enum value instead. No functionality change
intended.

llvm-svn: 165610
2012-10-10 07:36:45 +00:00
Bill Wendling
a55d5af923 Pass into the AttributeWithIndex::get method an ArrayRef of attribute
enums. These are then created via the correct Attributes creation method.

llvm-svn: 165607
2012-10-10 06:13:42 +00:00
Andrew Trick
79d929fd43 TODO comment
llvm-svn: 165605
2012-10-10 05:43:16 +00:00
Andrew Trick
4ca94d939c misched: Use the TargetSchedModel interface wherever possible.
Allows the new machine model to be used for NumMicroOps and OutputLatency.

Allows the HazardRecognizer to be disabled along with itineraries.

llvm-svn: 165603
2012-10-10 05:43:09 +00:00
Andrew Trick
13b4f59560 misched: Generate IsBuffered flag for machine resources.
llvm-svn: 165602
2012-10-10 05:43:04 +00:00
Bill Wendling
5f457b4ddd Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.
llvm-svn: 165595
2012-10-10 03:12:49 +00:00
Andrew Kaylor
b850da774b This patch adds new functions to the SectionRef and ObjectFile interfaces to determine whether or not a section is meant to be read-only. These functions will be used by the MCJIT RuntimeDyld to give hints to the memory manager during the object loading process in a future patch.
Patch by Ashok Thirumurthi.

llvm-svn: 165586
2012-10-10 01:41:33 +00:00
Andrew Trick
6ef4c5cf64 misched: Add computeInstrLatency to TargetSchedModel.
llvm-svn: 165566
2012-10-09 23:44:32 +00:00
Andrew Trick
31edb399c2 misched: Doxument the TargetSchedule API.
llvm-svn: 165565
2012-10-09 23:44:29 +00:00
Andrew Trick
0a8af76cb4 misched: Allow flags to disable hasInstrSchedModel/hasInstrItineraries for external users of TargetSchedule.
llvm-svn: 165564
2012-10-09 23:44:26 +00:00
Andrew Trick
54d088900c misched: Remove LoopDependencies heuristic.
This wasn't contributing anything significant to postRA heuristics except compile time (by my measurements) and will be replaced by a more general heuristic for cross-region dependencies within the scheduler itself.

llvm-svn: 165563
2012-10-09 23:44:23 +00:00
Bill Wendling
df45e1b495 Use the attribute builder to add attributes to call/invoke instruction. No functionality change intended.
llvm-svn: 165562
2012-10-09 23:40:31 +00:00
Douglas Gregor
ecabb8b6ff Add count() method to MapVector
llvm-svn: 165559
2012-10-09 23:02:47 +00:00
Micah Villmow
65c57bffdb Add in some interfaces that will allow easier access to the pointer address space.
llvm-svn: 165554
2012-10-09 22:27:29 +00:00
Bill Wendling
12999bb1df Use the attribute enums to query if a function has an attribute.
llvm-svn: 165551
2012-10-09 21:49:51 +00:00
Bill Wendling
04e6cf2045 Use the attribute enums to query if a parameter has an attribute.
llvm-svn: 165550
2012-10-09 21:38:14 +00:00
Bill Wendling
9abaefde08 Remove this now unused variable macro.
llvm-svn: 165543
2012-10-09 20:35:11 +00:00
Bill Wendling
fee7179aa9 Use appropriate method calls to get the alignment value.
llvm-svn: 165541
2012-10-09 20:28:54 +00:00
Bill Wendling
31ae26f466 Inline the checks for mutually exclusive attributes since they're used in only one module.
llvm-svn: 165539
2012-10-09 20:11:19 +00:00
Rafael Espindola
8e5adfa32c Enable response files in all tools. Patch by Liu, Yaxun (Sam). I have simplified
the test.

llvm-svn: 165535
2012-10-09 19:52:10 +00:00
Bill Wendling
ce3fe97e0d Move the 'FunctionOnly' attributes thingy inside of the Attributes class.
llvm-svn: 165530
2012-10-09 19:01:18 +00:00
Douglas Gregor
97b9fac1c3 Not everyone uses C++11, apparently
llvm-svn: 165517
2012-10-09 17:51:56 +00:00
Douglas Gregor
703f076085 Allow MapVector clients to specify the map and vector types, and add a
clear() method.

llvm-svn: 165514
2012-10-09 17:49:42 +00:00
Michael Ilseman
e025196817 More descriptive, doxygen-ed comments
llvm-svn: 165512
2012-10-09 17:05:59 +00:00
Michael Ilseman
e2a233d237 New value_op_iterator for User. This allows other code to iterate over the User's operands directly as values, which can be convenient.
llvm-svn: 165508
2012-10-09 16:55:14 +00:00
Micah Villmow
54aac8803f Add in the first step of the multiple pointer support. This adds in support to the data layout for specifying a per address space pointer size.
The next step is to update the optimizers to allow them to optimize the different address spaces with this information.

llvm-svn: 165505
2012-10-09 16:06:12 +00:00
Bill Wendling
42dfeb2f05 Move the 'ParameterOnly' variable inside of the Attributes class and make it a method.
llvm-svn: 165497
2012-10-09 09:51:10 +00:00
Bill Wendling
793576783f Remove the now dead VarArgsIncompatible variable.
llvm-svn: 165496
2012-10-09 09:33:01 +00:00
Bill Wendling
35d132644f Use the enum value of the attributes when removing them from the attributes builder.
llvm-svn: 165495
2012-10-09 09:17:28 +00:00
Bill Wendling
7d6ddcc8e3 Use the enum value of the attributes when adding them to the attributes builder.
llvm-svn: 165494
2012-10-09 09:11:20 +00:00
Alexey Samsonov
561aa02d50 Fix PR14016.
DeadArgumentElimination pass can replace one LLVM function with another,
invalidating a pointer stored in debug info metadata entry for this function.
To fix this, we collect debug info descriptors for functions before
running a DeadArgumentElimination pass and "patch" pointers in metadata nodes
if we replace a function.

llvm-svn: 165490
2012-10-09 08:13:15 +00:00
Bill Wendling
b53357de39 Create enums for the different attributes.
We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

llvm-svn: 165488
2012-10-09 07:45:08 +00:00
Bill Wendling
8fd2232878 Remove some dead methods.
llvm-svn: 165485
2012-10-09 05:54:39 +00:00
Bill Wendling
9d44569e18 Remove ifdef'd code.
llvm-svn: 165484
2012-10-09 05:36:15 +00:00
Nadav Rotem
a8c4b4b426 whitespace
llvm-svn: 165475
2012-10-09 01:56:07 +00:00
Sean Silva
00f72940dd Move misplaced comment.
llvm-svn: 165474
2012-10-09 01:47:16 +00:00
Bill Wendling
08940a9caf Remove a couple more 'hasAttrSomewhere' calls.
llvm-svn: 165470
2012-10-09 01:03:48 +00:00
Bill Wendling
4fa0f48d90 Remove more uses of the attribute enums by supplying appropriate query methods for them.
No functionality change intended.

llvm-svn: 165466
2012-10-09 00:28:54 +00:00
Bill Wendling
c00f4a514d Convert to using the Attributes::Builder interface.
llvm-svn: 165465
2012-10-09 00:01:21 +00:00
Bill Wendling
049a2c0fba Update comment.
llvm-svn: 165461
2012-10-08 23:51:19 +00:00
Bill Wendling
a95eee725b Use the Attributes::Builder to build the attributes in the parser.
llvm-svn: 165458
2012-10-08 23:27:46 +00:00
Nadav Rotem
e05c974426 Use DataTypes.h
llvm-svn: 165457
2012-10-08 23:14:28 +00:00
Nadav Rotem
c94270cb4d Refactor the AddrMode class out of TLI to its own header file.
This class is used by LSR and a number of places in the codegen.
This is the first step in de-coupling LSR from TLI, and creating
a new interface in between them.

llvm-svn: 165455
2012-10-08 23:06:34 +00:00
Bill Wendling
12b21caa9a Convert the LLVM parser over to using the new Attributes::Builder to build its
attributes objects.

llvm-svn: 165436
2012-10-08 22:20:14 +00:00
Nick Lewycky
7708f19f82 Give CaptureTracker::shouldExplore a base implementation. Most users want to do
the same thing. No functionality change.

llvm-svn: 165435
2012-10-08 22:12:48 +00:00
Bill Wendling
8f296ad68b Begin the transition to using the AttributesImpl object for the Attributes ivar.
Start using the AttributesImpl object to hold the value of the attributes. All
queries go through the interfaces now.

This has one unfortunate consequence. I needed to move the AttributesImpl.h file
into include/llvm. But this is only temporary! Otherwise, the changes needed to
support this would be too large.

llvm-svn: 165433
2012-10-08 21:47:17 +00:00
Eric Christopher
ab7c040025 Update comment.
llvm-svn: 165431
2012-10-08 21:41:18 +00:00
Andrew Trick
957ebf0670 misched: remove the unused getSpecialAddressLatency hook.
llvm-svn: 165418
2012-10-08 18:54:00 +00:00
Andrew Trick
e4aeb46966 misched: remove forceUnitLatencies. Defaults are handled by the default SchedModel
llvm-svn: 165417
2012-10-08 18:53:57 +00:00
Micah Villmow
bb1a25cd67 Move TargetData to DataLayout.
llvm-svn: 165402
2012-10-08 16:38:25 +00:00
Craig Topper
c95931d8e9 Remove unused MachineInstr constructors that don't take a DebugLoc argument.
llvm-svn: 165382
2012-10-07 23:03:22 +00:00
Bill Wendling
1b73a3d774 Move more methods out-of-line. This is in preparation for changing the internal
contents of the Attributes class over to an AttributesImpl.

llvm-svn: 165373
2012-10-07 08:55:05 +00:00
Chad Rosier
dfe52bb6c3 [ms-inline asm] Add a comment describing the MapAndConstraints.
llvm-svn: 165326
2012-10-05 19:00:51 +00:00
Chad Rosier
179f50da7a [ms-inline asm] Add a few typedefs to simplify future changes.
llvm-svn: 165324
2012-10-05 18:41:14 +00:00
Chad Rosier
71c792faf5 Remove extraneous semicolon.
llvm-svn: 165319
2012-10-05 17:15:19 +00:00
Micah Villmow
6c3051ff09 Implement TargetData with the DataLayout class, this will allow LLVM projects to transition to DataLayout without loosing functionality.
llvm-svn: 165318
2012-10-05 17:02:14 +00:00
Hemant Kulkarni
a4682fd467 Add ELF program header.
llvm-svn: 165316
2012-10-05 15:16:53 +00:00
Adhemerval Zanella
6636dee46e Add PowerPC64 definitions for ELF.h
llvm-svn: 165314
2012-10-05 14:32:46 +00:00
Bill Wendling
2101754de0 Move methods out-of-line.
The internal representation of the Attributes class will be opaque. All of the
query methods will need to query the opaque class. Therefore, these methods need
to be out-of-line.
No functionality change intended.

llvm-svn: 165305
2012-10-05 06:44:41 +00:00
Sean Silva
37c527811e tblgen: Use appropriate LLVM-style RTTI functions.
Use isa<> or cast<> when semantically that is what is happening. Also
some trivial "style" cleanups at fix sites.

llvm-svn: 165292
2012-10-05 03:32:00 +00:00
Sean Silva
f8b271827e tblgen: Replace uses of dynamic_cast<XXXRecTy> with dyn_cast<>.
This is a mechanical change of dynamic_cast<> to dyn_cast<>. A number of
these uses are actually more like isa<> or cast<>, and will be changed
to the semanticaly appropriate one in a future patch.

llvm-svn: 165291
2012-10-05 03:31:58 +00:00
Sean Silva
91f8ba7b59 tblgen: Put dyn_cast<> infrastructure in place for RecTy hierarchy.
llvm-svn: 165290
2012-10-05 03:31:56 +00:00
Eli Friedman
cf7d009911 Make sure to generate the right kind of MDNode for enum forward declarations.
PR14029, LLVM part.

llvm-svn: 165288
2012-10-05 01:49:14 +00:00
Micah Villmow
3570de6384 Rename the Target specific passes in the DataLayout class to be Target agnostic.
llvm-svn: 165270
2012-10-04 23:01:22 +00:00
Micah Villmow
1afd9d1e32 Resubmit the copying of TargetData to DataLayout without any changes to the files, this should fix the problems and the changes to rename to DataLayout will come next.
llvm-svn: 165262
2012-10-04 22:08:14 +00:00
Preston Gurd
0256511b5d This patch corrects commit 165126 by using an integer bit width instead of
a pointer to a type, in order to remove the uses of getGlobalContext().

Patch by Tyler Nowicki.

llvm-svn: 165255
2012-10-04 21:33:40 +00:00
Micah Villmow
f89fff64e1 Backing out my changes, something screwed up from my patches, starting over.
llvm-svn: 165253
2012-10-04 21:08:50 +00:00
Micah Villmow
46585fd8f6 Create the DataLayout class, as a direct copy of TargetData.
llvm-svn: 165249
2012-10-04 20:44:22 +00:00
Micah Villmow
7416d8cd69 Accidently checked in the files, only wanted to copy them.
llvm-svn: 165244
2012-10-04 20:08:28 +00:00
Micah Villmow
20f5058e9d (no commit message)
llvm-svn: 165242
2012-10-04 20:05:12 +00:00
Jakub Staszak
9580482ec0 Fix doxygen comment to match parameters' names.
llvm-svn: 165239
2012-10-04 19:10:44 +00:00
Jakob Stoklund Olesen
6555de9442 Switch MachineTraceMetrics to the new TargetSchedModel interface.
llvm-svn: 165235
2012-10-04 17:30:40 +00:00
Benjamin Kramer
7fab511b16 Hoist some grossly duplicated code from the COFF/ELF/MachO streamers into MCObjectStreamer.
llvm-svn: 165225
2012-10-04 13:12:43 +00:00
Duncan Sands
722d22dbb6 Fix wrong name in comment.
llvm-svn: 165224
2012-10-04 13:07:26 +00:00
Bill Wendling
06dd3904ad Add method to query for NoCapture attribute.
llvm-svn: 165212
2012-10-04 07:18:12 +00:00
Bill Wendling
f8bfab0dde Use attribute query methods.
llvm-svn: 165210
2012-10-04 07:08:30 +00:00
Bill Wendling
f6649b4e9a Add method to query for 'NoAlias' attribute on call/invoke instructions.
llvm-svn: 165208
2012-10-04 06:52:09 +00:00
Andrew Trick
d6d5b63b3b Added instregex support to TableGen subtarget emitter.
This allows the processor-specific machine model to override selected
base opcodes without any fanciness.
e.g. InstRW<[CoreXWriteVANDP], (instregex "VANDP")>.

llvm-svn: 165180
2012-10-03 23:06:32 +00:00
Sean Silva
b3025c6bf1 tblgen: Remove last traces of old TableGenMain API.
llvm-svn: 165168
2012-10-03 21:31:08 +00:00
Sean Silva
60e882ca52 tblgen: Put new TableGenMain API in place.
In order to avoid rev-lock with Clang when moving to the new API, also
preserve the current API temporarily and insert a shim to implement the
new API in terms of the old.

llvm-svn: 165165
2012-10-03 21:29:18 +00:00
Bill Wendling
1c72ca83da Add function to return return attributes.
llvm-svn: 165164
2012-10-03 21:19:35 +00:00
Bill Wendling
3b8e120816 No need to call functions which do the same thing as the default.
llvm-svn: 165135
2012-10-03 18:10:49 +00:00
Bill Wendling
8755cdde9e Remove assert that's too restrictive.
llvm-svn: 165134
2012-10-03 18:08:57 +00:00
Bill Wendling
2553bfdd2b Add methods which query for the specific attribute instead of using the
enums. This allows for better encapsulation of the Attributes class.

llvm-svn: 165132
2012-10-03 17:54:26 +00:00
Eric Christopher
fcbfbbf732 Revert 165051-165049 while looking into the foreach.m failure in
more detail.

llvm-svn: 165099
2012-10-03 08:10:01 +00:00
Craig Topper
15c4f34e4a Remove unused function that used to get itineraries from SubTargetFeatures. This is done from MCSubTargetInfo these days.
llvm-svn: 165092
2012-10-03 06:26:11 +00:00
Chandler Carruth
e189a098e8 Third try at fixing this. ;] Go back to using std::remove_if, which has
most of the behavior we want, but wrap the predicate in one which erases
elements from the set if they pass the predicate. Oh what I wouldn't
give for a lambda here.

Let me know if the predicate wrapping is too much magic. ;]

llvm-svn: 165076
2012-10-03 01:04:07 +00:00
Chandler Carruth
f28a5b80a4 Switch the SetVector::remove_if implementation to use partition which
preserves the values of the relocated entries, unlikely remove_if. This
allows walking them and erasing them.

Also flesh out the predicate we are using for this to support the
various constraints actually imposed on a UnaryPredicate -- without this
we can't compose it with std::not1.

Thanks to Sean Silva for the review here and noticing the issue with
std::remove_if.

llvm-svn: 165073
2012-10-03 00:03:00 +00:00
Chad Rosier
6bc8eb2a5f Revert 165057, per Jim's request. This requires further discussion.
llvm-svn: 165069
2012-10-02 23:38:50 +00:00
Chandler Carruth
72359007f5 Teach the new SROA to handle cases where an alloca that has already been
scheduled for processing on the worklist eventually gets deleted while
we are processing another alloca, fixing the original test case in
PR13990.

To facilitate this, add a remove_if helper to the SetVector abstraction.
It's not easy to use the standard abstractions for this because of the
specifics of SetVectors types and implementation.

Finally, a nice small test case is included. Thanks to Benjamin for the
fantastic reduced test case here! All I had to do was delete some empty
basic blocks!

llvm-svn: 165065
2012-10-02 22:46:45 +00:00
Chandler Carruth
04822c8467 Clean up these doxygen comments to follow the proposed new style. This
also makes it more consistent with Clang and several passes' doxygen
style.

llvm-svn: 165064
2012-10-02 22:46:40 +00:00
Chad Rosier
7d3ce8d6a6 [ms-inline asm] Add basic support for wildcard MCParsedAsmOperands. This type
of operand is specific to MS-style inline assembly and should not be generated
when parsing normal assembly.

The purpose of the wildcard operands are to allow the AsmParser to match
multiple instructions (i.e., MCInsts) to a given ms-style asm statement.  For
the time being the matcher just returns the first match.  This patch only
implements wildcard matches for memory operands.  Support for register
wildcards will be added in the near future.

llvm-svn: 165057
2012-10-02 21:49:07 +00:00
Andrew Kaylor
1cb3a832d4 Clean-up of memory buffer and object ownership model in MCJIT
llvm-svn: 165053
2012-10-02 21:18:39 +00:00
Eric Christopher
e8c7bf06b6 Remove the SavePoint infrastructure from fast isel, replace
with just an insert point from the MachineBasicBlock and let
the location be updated as we access it.

llvm-svn: 165049
2012-10-02 21:16:50 +00:00
Andrew Kaylor
0d06582cd5 Support for generating ELF objects on Windows.
This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present.  This patch also enables MCJIT tests on Windows using the new environment value.

llvm-svn: 165030
2012-10-02 18:38:34 +00:00
Chad Rosier
5e80eb4c86 [ms-inline asm] Add the convertToMapAndConstraints() function that is used to
map constraints and MCInst operands to inline asm operands.  This replaces the
getMCInstOperandNum() function.

The logic to determine the constraints are not in place, so we still default to
a register constraint (i.e., "r"). Also, we no longer build the MCInst but
rather return just the opcode to get the MCInstrDesc.

llvm-svn: 164979
2012-10-01 23:45:51 +00:00
Jim Grosbach
037348ce80 MachO: direct-to-object attribute for data-in-code markers.
The target backend can support data-in-code load commands even when
the assembler doesn't, or vice-versa. Allow targets to opt-in for
direct-to-object.

PR13973.

llvm-svn: 164974
2012-10-01 22:20:54 +00:00
Chad Rosier
b475e38fc8 [ms-inline asm] Expose the getReg() function in the base class.
llvm-svn: 164969
2012-10-01 20:53:03 +00:00
Micah Villmow
c2b360eb5b Add in support for SPIR to LLVM core. This adds a new target and two new calling conventions.
llvm-svn: 164948
2012-10-01 17:01:31 +00:00
Michael Liao
f2905fc76e Fix PR13899
- Update maximal stack alignment when stack arguments are prepared before a
  call.
- Test cases are enhanced to show it's not a Win32 specific issue but a generic
  one.

llvm-svn: 164946
2012-10-01 16:44:04 +00:00
Benjamin Kramer
56415ad3cd Provide a shortcut for MCObjectStreamer when emitting fills.
Reduces runtime of i386-large-relocations.s by 10x in Release builds, even more
in Debug+Asserts builds.

llvm-svn: 164945
2012-10-01 15:14:14 +00:00
Benjamin Kramer
41d567a2a7 TargetData: s/uint32_t/unsigned/ per Kuba's request.
llvm-svn: 164935
2012-10-01 11:56:16 +00:00
Bob Wilson
ee6a40c517 Add LLVM support for Swift.
llvm-svn: 164899
2012-09-29 21:43:49 +00:00
Benjamin Kramer
4a627eee1d Shrink TargetAlignElem a bit, we do a lot of searches on them.
llvm-svn: 164897
2012-09-29 19:57:14 +00:00
Craig Topper
d903ec6dc2 Remove more LLVM_DELETED_FUNCTIONs from destructors to fix -std=c++11 build on gcc 4.7.
llvm-svn: 164880
2012-09-29 02:25:34 +00:00
Bill Wendling
3072860a8f Remove unused methods.
llvm-svn: 164848
2012-09-28 21:22:24 +00:00
Andrew Kaylor
6b7788b0c5 Removing dependency on third party library for Intel JIT event support.
Patch committed on behalf of Kirill Uhanov

llvm-svn: 164831
2012-09-28 17:35:20 +00:00
Benjamin Kramer
bfbf4015c4 PackedVector: Make the BitVector implementation configurable.
llvm-svn: 164826
2012-09-28 16:40:29 +00:00