1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

17098 Commits

Author SHA1 Message Date
Nadav Rotem
fcfd42040b DAGCombinerInformation: add a getter that exposes the dagcombine level.
llvm-svn: 171152
2012-12-27 08:44:35 +00:00
Alexey Samsonov
319ccd0fdb Fix new[]/delete mismatch in FullDependence spotted by AddressSanitizer
llvm-svn: 171150
2012-12-27 08:40:37 +00:00
Nadav Rotem
55c5987673 Refactor DAGCombinerInfo. Change the different booleans that indicate if we are before or after different runs of DAGCo, with the CombineLevel enum.
Also, added a new API for checking if we are running before or after the LegalizeVectorOps phase. 

llvm-svn: 171142
2012-12-27 06:47:41 +00:00
Nadav Rotem
798533821a whitespace
llvm-svn: 171129
2012-12-27 02:04:12 +00:00
Eric Christopher
c6fa1e95a2 Right now all of the relocations are 32-bit dwarf, and the relocation
information doesn't return an addend for Rel relocations. Go ahead
and use this information to fix relocation handling inside dwarfdump
for 32-bit ELF REL.

llvm-svn: 171126
2012-12-27 01:07:07 +00:00
Nadav Rotem
8ab52765bc white space
llvm-svn: 171090
2012-12-26 04:58:12 +00:00
Hal Finkel
62efc81644 Loosen scheduling restrictions on the PPC dcbt intrinsic
As with the prefetch intrinsic to which it maps, simply have dcbt
marked as reading from and writing to its arguments instead of having
unmodeled side effects. While this might cause unwanted code motion
(because aliasing checks don't really capture cache-line sharing),
it is more important that prefetches in unrolled loops don't block
the scheduler from rearranging the unrolled loop body.

llvm-svn: 171073
2012-12-25 18:51:18 +00:00
Bob Wilson
b0b344d1f6 Rename LLVMContext diagnostic handler types and functions.
These are now generally used for all diagnostics from the backend, not just
for inline assembly, so this drops the "InlineAsm" from the names.  No
functional change.  (I've left aliases for the old names but only for long
enough to let me switch over clang to use the new ones.)

llvm-svn: 171047
2012-12-25 00:07:12 +00:00
Bob Wilson
94a94e9500 Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>
When the backend is used from clang, it should produce proper diagnostics
instead of just printing messages to errs(). Other clients may also want to
register their own error handlers with the LLVMContext, and the same handler
should work for warnings in the same way as the existing emitError methods.

llvm-svn: 171041
2012-12-24 18:15:21 +00:00
Nadav Rotem
286f6b8ea1 CostModel: We have API for checking the costs of known shuffles. This patch adds
support for the insert-subvector and extract-subvector kinds.

llvm-svn: 171027
2012-12-24 10:04:03 +00:00
Elena Demikhovsky
33e7b6276c Added 6 more value types: v32i1, v64i1, v32i16, v32i8, v64i8, v8f64
llvm-svn: 171026
2012-12-24 10:03:57 +00:00
Nadav Rotem
f8f6a2ff97 Change the codegen Cost Model API for shuffeles. This patch removes the API for broadcast and adds a more general API that accepts an enum of known shuffles.
llvm-svn: 171022
2012-12-24 08:57:47 +00:00
NAKAMURA Takumi
ff3931121b llvm/MC/MCMachObjectWriter.h: ComputeSymbolTable(): Prune one description in the comment. [-Wdocumentation]
/// \param StringIndexMap [out] - Map from symbol names to offsets in the string table.

llvm-svn: 171010
2012-12-24 01:24:04 +00:00
Nadav Rotem
fb56b5fe2e CostModel: Change the default target-independent implementation for finding
the cost of arithmetic functions. We now assume that the cost of arithmetic
operations that are marked as Legal or Promote is low, but ops that are
marked as custom are higher.

llvm-svn: 171002
2012-12-23 17:31:23 +00:00
Nadav Rotem
e237376e62 Loop Vectorizer: Update the cost model of scatter/gather operations and make
them more expensive.

llvm-svn: 170995
2012-12-23 07:23:55 +00:00
Craig Topper
ab2b0315f2 Add a comma to fix the build.
llvm-svn: 170982
2012-12-22 08:22:01 +00:00
Craig Topper
faf5d76df0 Use a negative value to represent INVALID_SIMPLE_VALUE_TYPE instead of 256. Its much cheaper for the isSimple() checks to look for values less than 0 rather than a value greater than 255. This shaves ~8k off the size of the llc binary on x86-64.
llvm-svn: 170981
2012-12-22 08:16:17 +00:00
Craig Topper
7d908d812c Add vAny and Metadata to the switch in getSizeInBits for consistency since every other enum was listed.
llvm-svn: 170977
2012-12-22 03:08:37 +00:00
Bill Wendling
a16e5519db Change 'AttrVal' to 'AttrKind' to better reflect that it's a kind of attribute instead of the value of the attribute.
llvm-svn: 170972
2012-12-22 00:37:52 +00:00
Richard Smith
396fedeb01 Fix some undefined behavior when parsing YAML input: don't try to compare an
uninitialized value against a default value. Found by -fsanitize=enum.

llvm-svn: 170970
2012-12-22 00:31:54 +00:00
Jakob Stoklund Olesen
15218a60cd Add a missing assertion, the null register has no register units.
llvm-svn: 170916
2012-12-21 18:38:09 +00:00
Evgeniy Stepanov
ea2d72253e [msan] Remove unreachable blocks before instrumenting a function.
llvm-svn: 170883
2012-12-21 11:18:49 +00:00
Rafael Espindola
cca2985848 Add a function to get the segment name of a section.
On MachO, sections also have segment names. When a tool looking at a .o file
prints a segment name, this is what they mean. In reality, a .o has only one
anonymous, segment.

This patch adds a MachO only function to fetch that segment name. I named it
getSectionFinalSegmentName since the main use for the name seems to be inform
the linker with segment this section should go to.

The patch also changes MachOObjectFile::getSectionName to return just the
section name instead of computing SegmentName,SectionName.

The main difference from the previous patch is that it doesn't use
InMemoryStruct. It is extremely dangerous: if the endians match it returns
a pointer to the file buffer, if not, it returns a pointer to an internal buffer
that is overwritten in the next API call.

We should change all of this code to use
support::detail::packed_endian_specific_integral like ELF, but since these
functions only handle strings, they work with big and little endian machines
as is.

I have tested this by installing ubuntu 12.10 ppc on qemu, that is why it took
so long :-)

llvm-svn: 170838
2012-12-21 03:47:03 +00:00
Evan Cheng
6e9736cf5e Add targets to skip running the GC passes.
llvm-svn: 170836
2012-12-21 02:57:04 +00:00
Jakob Stoklund Olesen
c000c3d36d Require the two-argument MI::addOperand(MF, MO) for dangling instructions.
Instructions that are inserted in a basic block can still be decorated
with addOperand(MO).

Make the two-argument addOperand() function contain the actual
implementation. This function will now always have a valid MF reference
that it can use for memory allocation.

llvm-svn: 170798
2012-12-20 22:54:05 +00:00
Jakob Stoklund Olesen
c81d04b28d Add an MF argument to MI::copyImplicitOps().
This function is often used to decorate dangling instructions, so a
context reference is required to allocate memory for the operands.

Also add a corresponding MachineInstrBuilder method.

llvm-svn: 170797
2012-12-20 22:54:02 +00:00
Jakob Stoklund Olesen
ae8ba671bc Use two-arg addOperand(MF, MO) internally in MachineInstr when possible.
llvm-svn: 170796
2012-12-20 22:53:58 +00:00
Bill Wendling
31f5f9fc8c Some random comment, naming, and format changes.
Rename the AttributeImpl* from Attrs to pImpl to be consistent with other code.
Add comments where none were before. Or doxygen-ify other comments.

llvm-svn: 170767
2012-12-20 21:28:43 +00:00
Jakob Stoklund Olesen
abf1746cb5 Remove two dead functions.
llvm-svn: 170766
2012-12-20 21:12:42 +00:00
Bob Wilson
3cae2545eb Revert "Adding support for llvm.arm.neon.vaddl[su].* and"
This reverts r170694.  The operations can be represented in IR without
adding any new intrinsics.

llvm-svn: 170765
2012-12-20 21:09:38 +00:00
Eli Bendersky
b0643bbb71 Aligned bundling support. Following the discussion here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056754.html

The proposal and implementation are fully documented here:
https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm

Tests will follow shortly.

llvm-svn: 170718
2012-12-20 19:05:53 +00:00
Jim Grosbach
db03224187 Fix inadvertant delete of 'has'.
llvm-svn: 170713
2012-12-20 18:09:48 +00:00
Jakob Stoklund Olesen
51accf509d Use MachineInstrBuilder in InstrEmitter.
This is supposed to be a mechanical change with no functional effects.

InstrEmitter can generate all types of MachineOperands which revealed
that MachineInstrBuilder was missing a few methods, added by this patch.

Besides providing a context pointer to MI::addOperand(),
MachineInstrBuilder seems like a better fit for this code.

llvm-svn: 170712
2012-12-20 18:08:09 +00:00
James Molloy
de926c367f Add a new attribute, 'noduplicate'. If a function contains a noduplicate call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call.
Similarly inlining of the function is inhibited, if that would duplicate the call (in particular inlining is still allowed when there is only one callsite and the function has internal linkage).

llvm-svn: 170704
2012-12-20 16:04:27 +00:00
Roman Divacky
f63db8e20d Remove MCTargetAsmLexer and its derived classes now that edis,
its only user, is gone.

llvm-svn: 170699
2012-12-20 14:43:30 +00:00
Renato Golin
1fbd598908 Adding support for llvm.arm.neon.vaddl[su].* and
llvm.arm.neon.vsub[su].* intrinsics.

Patch by Pete Couperus <pjcoup@gmail.com>

llvm-svn: 170694
2012-12-20 13:52:11 +00:00
Richard Smith
b5bb001e95 Don't use -1 as a value of an unsigned 7-bit enumeration; that has undefined
behavior and violates the !range constraints we put on loads of this enum.
Found by clang -fsanitize=enum.

llvm-svn: 170653
2012-12-20 04:02:58 +00:00
Richard Smith
c8f921953e Don't leave IsUnsigned uninitialized in a default-constructed APSInt. Copying
such a structure has undefined behavior. Caught by -fsanitize=bool.

llvm-svn: 170652
2012-12-20 03:59:24 +00:00
Bill Wendling
c402454b6f s/AttributesImpl/AttributeImpl/g This is going to apply to Attribute, not Attributes.
llvm-svn: 170631
2012-12-20 01:36:59 +00:00
Jim Grosbach
92265aabfb Clean up some DOxygen comments.
llvm-svn: 170629
2012-12-20 01:14:48 +00:00
Jim Grosbach
f57dff9005 Clean up some DOxygen comments.
llvm-svn: 170628
2012-12-20 01:14:45 +00:00
Jim Grosbach
431f84fb2f MC: Add MCInstrDesc::mayAffectControlFlow() method.
MC disassembler clients (LLDB) are interested in querying if an
instruction may affect control flow other than by virtue of being
an explicit branch instruction. For example, instructions which
write directly to the PC on some architectures.

llvm-svn: 170610
2012-12-19 23:38:53 +00:00
Jim Grosbach
e30a84f8e2 Add isSubRegisterEq() and isSuperRegisterEq().
isSub and isSuper return false if RegA == RegB. Add variants which also
include the identity function.

llvm-svn: 170609
2012-12-19 23:38:49 +00:00
Jim Grosbach
af9cecb0f9 Move isSubRegister() and isSuperRegister to MCRegisterInfo.
These were defined on TargetRegisterInfo, but they don't use any information
that's not available in MCRegisterInfo, so sink them down to be available
at the MC layer.

llvm-svn: 170608
2012-12-19 23:38:46 +00:00
Jim Grosbach
e4bfd95b15 Fix doc comment. '///' not '//'.
llvm-svn: 170607
2012-12-19 23:38:44 +00:00
Michael Ilseman
66430c26a2 Refactor isIntrinsic() to be quicker, and change classof() (and thus, isa<IntrinsicInst>()) to use it. This decreases the number of occurrences of the slow-path string matching performed by getIntrinsicID().
llvm-svn: 170602
2012-12-19 23:17:20 +00:00
Bill Wendling
1528218a6f s/AttributeListImpl/AttributeSetImpl/g to match the namechange of AttributeList.
llvm-svn: 170600
2012-12-19 22:42:22 +00:00
Jakob Stoklund Olesen
6a6f13878a Always use addOperand(MF, MO) from MachineInstrBuilder.
The single-argument MachineInstr::addOperand(MO) will be removed soon.

llvm-svn: 170599
2012-12-19 22:35:46 +00:00
Jakob Stoklund Olesen
eab040c93e Remove the explicit MachineInstrBuilder(MI) constructor.
Use the version that also takes an MF reference instead.

It would technically be possible to extract an MF reference from the MI
as MI->getParent()->getParent(), but that would not work for MIs that
are not inserted into any basic block.

Given the reasonably small number of places this constructor was used at
all, I preferred the compile time check to a run time assertion.

llvm-svn: 170588
2012-12-19 21:31:56 +00:00
Benjamin Kramer
9a5e8dfdb9 Remove edis remnant.
llvm-svn: 170580
2012-12-19 20:11:17 +00:00