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

87547 Commits

Author SHA1 Message Date
Bill Wendling
620587ed25 Inline the 'hasIncompatibleWithVarArgsAttrs' method into its only uses. And some minor comment reformatting.
llvm-svn: 170516
2012-12-19 08:57:40 +00:00
Nadav Rotem
833bf77529 DOC: fix the url format.
llvm-svn: 170513
2012-12-19 08:43:05 +00:00
Patrik Hagglund
79b70f34a2 Change TargetLowering::getTruncStoreAction to take MVTs, instead of EVTs.
llvm-svn: 170510
2012-12-19 08:28:51 +00:00
Nadav Rotem
10ed93e100 DOC: add a benchmarks that compares us to gcc and icc.
llvm-svn: 170509
2012-12-19 08:28:24 +00:00
Elena Demikhovsky
12a5e01a52 Optimized load + SIGN_EXTEND patterns in the X86 backend.
llvm-svn: 170506
2012-12-19 07:50:20 +00:00
Nadav Rotem
626e9199af After reducing the size of an operation in the DAG we zero-extend the reduced
bitwidth op back to the original size. If we reduce ANDs then this can cause
an endless loop. This patch changes the ZEXT to ANY_EXTEND if the demanded bits
are equal or smaller than the size of the reduced operation.

llvm-svn: 170505
2012-12-19 07:39:08 +00:00
Nadav Rotem
19ffa12ce1 docs: fix typos.
llvm-svn: 170504
2012-12-19 07:36:35 +00:00
Nadav Rotem
e42a1b9f42 DOC: Add a webpage that describes the loop and bb vectorizers.
llvm-svn: 170503
2012-12-19 07:22:24 +00:00
Bill Wendling
56d9c4b832 Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
llvm-svn: 170502
2012-12-19 07:18:57 +00:00
Craig Topper
a5c7087cc4 Remove more of 'else's after 'returns'. No functional change.
llvm-svn: 170497
2012-12-19 06:43:58 +00:00
Craig Topper
8b9784ee6e Remove a bunch of 'else's after 'returns'
llvm-svn: 170496
2012-12-19 06:39:17 +00:00
Craig Topper
ba9bcee7f1 Teach SimplifySetCC that comparing AssertZext i1 against a constant 1 can be rewritten as a compare against a constant 0 with the opposite condition.
llvm-svn: 170495
2012-12-19 06:12:28 +00:00
Reed Kotler
c3d7268c6e Add some missing Defs and Uses.
llvm-svn: 170493
2012-12-19 04:06:15 +00:00
Shuxin Yang
6f5cd3ba7f Make sure the buffer, which containas an instance of APFloat, has proper alignment.
llvm-svn: 170486
2012-12-19 01:10:17 +00:00
Kevin Enderby
d8bc58f238 Add to the disassembler C API an option to print the disassembled
instructions in the assembly code variant if one exists.

The intended use for this is so tools like lldb and darwin's otool(1)
can be switched to print Intel-flavored disassembly.

I discussed extensively this API with Jim Grosbach and we feel
while it may not be fully general, in reality there is only one syntax
for each assembly with the exception of X86 which has exactly
two for historical reasons.

rdar://10989182

llvm-svn: 170477
2012-12-18 23:47:28 +00:00
Jakob Stoklund Olesen
ca240257dd Remove MachineInstr::setIsInsideBundle().
The bundle flags are now maintained by the slightly higher-level
functions bundleWithPred() / bundleWithSucc() which enforce consistent
bundle flags between neighboring instructions.

See also MIBundleBuilder for an even higher-level approach to building
bundles.

llvm-svn: 170475
2012-12-18 23:40:14 +00:00
Jakob Stoklund Olesen
ec41ce6af5 Use bidirectional bundle flags to simplify important functions.
The bundle_iterator::operator++ function now doesn't need to dig out the
basic block and check against end(). It can use the isBundledWithSucc()
flag to find the last bundled instruction safely.

Similarly, MachineInstr::isBundled() no longer needs to look at
iterators etc. It only has to look at flags.

llvm-svn: 170473
2012-12-18 23:21:49 +00:00
Shuxin Yang
712da2e5c6 rdar://12801297
InstCombine for unsafe floating-point add/sub.

llvm-svn: 170471
2012-12-18 23:10:12 +00:00
Nadav Rotem
e44a431d35 Enable the loop vectorizer in clang and not in the pass manager, so that we can disable it in clang.
llvm-svn: 170470
2012-12-18 23:09:44 +00:00
Jakob Stoklund Olesen
26def8a76e Verify bundle flag consistency when setting them.
Now that the bundle flag aware APIs are all in place, it is possible to
continuously verify the flag consistency.

llvm-svn: 170465
2012-12-18 23:00:28 +00:00
Jakub Staszak
837a7e5c18 Reverse order of checking SSE level when calculating compare cost, so we check
AVX2 before AVX.

llvm-svn: 170464
2012-12-18 22:57:56 +00:00
Jakob Stoklund Olesen
3356722468 Verify bundle flags for consistency in MachineVerifier.
The new bidirectional bundle flags are redundant, so inadvertent bundle
tearing can be detected in the machine code verifier.

llvm-svn: 170463
2012-12-18 22:55:07 +00:00
Quentin Colombet
104aea3aa3 Disable ARM partial flag dependency optimization at -Oz
To not over constrain the scheduler for ARM in thumb mode, some optimizations  for code size reduction, specific to ARM thumb, are blocked when they add a dependency (like write after read dependency).

Disables this check when code size is the priority, i.e., code is compiled with -Oz.

llvm-svn: 170462
2012-12-18 22:47:16 +00:00
Jakob Stoklund Olesen
bb62a04bd5 Don't allow the automatically updated MI flags to be set directly.
The bundle-related MI flags need to be kept in sync with the neighboring
instructions. Don't allow the bulk flag-setting setFlags() function to
change them.

Also don't copy MI flags when cloning an instruction. The clone's bundle
flags will be set when it is explicitly inserted into a bundle.

llvm-svn: 170459
2012-12-18 21:36:05 +00:00
Jakob Stoklund Olesen
30c70df3ef Tighten up the splice() API for bundled instructions.
Remove the instr_iterator versions of the splice() functions. It doesn't
seem useful to be able to splice sequences of instructions that don't
consist of full bundles.

The normal splice functions that take MBB::iterator arguments are not
changed, and they can move whole bundles around without any problems.

llvm-svn: 170456
2012-12-18 20:59:41 +00:00
Andrew Trick
57f2ff72d8 MISched: add dependence to ExitSU to model live-out latency.
llvm-svn: 170454
2012-12-18 20:53:01 +00:00
Andrew Trick
ec2ee6a2cb MISched: Cleanup, redundant statement.
llvm-svn: 170453
2012-12-18 20:52:58 +00:00
Andrew Trick
488fcad728 MISched: Heuristics, compare latency more precisely. It matters more for some targets.
llvm-svn: 170452
2012-12-18 20:52:56 +00:00
Andrew Trick
61a9267f72 MISched: Remove SchedRemainder::IsResourceLimited. I don't know how to compute it.
llvm-svn: 170451
2012-12-18 20:52:54 +00:00
Andrew Trick
b7504c6a1a MISched: cleanup, use the proper iterator type.
llvm-svn: 170450
2012-12-18 20:52:52 +00:00
Andrew Trick
1ed11f4abb MISched: minor improvement, initialize remaining resources before the first scheduling decision.
llvm-svn: 170449
2012-12-18 20:52:49 +00:00
Jakob Stoklund Olesen
223ce5e130 Add an assertion for a likely ilist::splice() contract violation.
The single-element ilist::splice() function supports a noop move:

  List.splice(I, List, I);

The corresponding std::list function doesn't allow that, so add a unit
test to document that behavior.

This also means that

  List.splice(I, List, F);

is somewhat surprisingly not equivalent to

  List.splice(I, List, F, next(F));

This patch adds an assertion to catch the illegal case I == F above.
Alternatively, we could make I == F a legal noop, but that would make
ilist differ even more from std::list.

llvm-svn: 170443
2012-12-18 19:28:37 +00:00
Benjamin Kramer
820b613d80 LoopVectorize: Emit reductions as log2(vectorsize) shuffles + vector ops instead of scalar operations.
For example on x86 with SSE4.2 a <8 x i8> add reduction becomes
	movdqa	%xmm0, %xmm1
	movhlps	%xmm1, %xmm1            ## xmm1 = xmm1[1,1]
	paddw	%xmm0, %xmm1
	pshufd	$1, %xmm1, %xmm0        ## xmm0 = xmm1[1,0,0,0]
	paddw	%xmm1, %xmm0
	phaddw	%xmm0, %xmm0
	pextrb	$0, %xmm0, %edx

instead of
	pextrb	$2, %xmm0, %esi
	pextrb	$0, %xmm0, %edx
	addb	%sil, %dl
	pextrb	$4, %xmm0, %esi
	addb	%dl, %sil
	pextrb	$6, %xmm0, %edx
	addb	%sil, %dl
	pextrb	$8, %xmm0, %esi
	addb	%dl, %sil
	pextrb	$10, %xmm0, %edi
	pextrb	$14, %xmm0, %edx
	addb	%sil, %dil
	pextrb	$12, %xmm0, %esi
	addb	%dil, %sil
	addb	%sil, %dl

llvm-svn: 170439
2012-12-18 18:40:20 +00:00
Eli Bendersky
96d7308d33 Get rid of the pesky -Woverloaded-virtual warning. No change in functionality.
llvm-svn: 170438
2012-12-18 18:21:29 +00:00
Jakob Stoklund Olesen
2279c46fe0 Tighten the insert() API for bundled instructions.
The normal insert() function takes an MBB::iterator position, and
inserts a stand-alone MachineInstr as before.

The insert() function that takes an MBB::instr_iterator position can
insert instructions inside a bundle, and will now update the bundle
flags correctly when that happens.

When the insert position is between two bundles, it is unclear whether
the instruction should be appended to the previous bundle, prepended to
the next bundle, or stand on its own. The MBB::insert() function doesn't
bundle the instruction in that case, use the MIBundleBuilder class for
that.

llvm-svn: 170437
2012-12-18 17:54:53 +00:00
Hal Finkel
e689252aae Check multiple register classes for inline asm tied registers
A register can be associated with several distinct register classes.
For example, on PPC, the floating point registers are each associated with
both F4RC (which holds f32) and F8RC (which holds f64). As a result, this code
would fail when provided with a floating point register and an f64 operand
because it would happen to find the register in the F4RC class first and
return that. From the F4RC class, SDAG would extract f32 as the register
type and then assert because of the invalid implied conversion between
the f64 value and the f32 register.

Instead, search all register classes. If a register class containing the
the requested register has the requested type, then return that register
class. Otherwise, as before, return the first register class found that
contains the requested register.

llvm-svn: 170436
2012-12-18 17:50:58 +00:00
Nadav Rotem
56fcb5094f Enable the loop vectorizer.
llvm-svn: 170416
2012-12-18 06:37:12 +00:00
Nadav Rotem
1a0271f07b Rename the test so that we can add additional vectors-of-pointers tests
into the same file in the future.

llvm-svn: 170414
2012-12-18 05:50:54 +00:00
Nadav Rotem
c22e8c34a7 SROA: Replace calls to getScalarSizeInBits to DataLayout's API because
getScalarSizeInBits could not handle vectors of pointers.

llvm-svn: 170412
2012-12-18 05:23:31 +00:00
NAKAMURA Takumi
3580df55e9 llvm/test/MC/ELF/comp-dir.s: Appease MSYS Bash.
llvm-svn: 170410
2012-12-18 05:08:12 +00:00
Rafael Espindola
4b69f2028d Initialize NoRedZone and remove unused default values.
llvm-svn: 170404
2012-12-18 03:35:05 +00:00
Eli Bendersky
2f9c935bb0 Cleanup comment and formatting
llvm-svn: 170398
2012-12-18 00:53:36 +00:00
Jakob Stoklund Olesen
250de7c107 Repair bundles that were broken by removing and reinserting the first
instruction.

This isn't strictly necessary at the moment because Thumb2SizeReduction
also copies all MI flags from the old instruction to the new. However, a
future patch will make that kind of direct flag tampering illegal.

llvm-svn: 170395
2012-12-18 00:46:39 +00:00
Eric Christopher
b36cab5fff Formatting.
llvm-svn: 170394
2012-12-18 00:42:26 +00:00
Eric Christopher
ed859a3fb8 Add support for passing -main-file-name all the way through to
the assembler.

Part of PR14624

llvm-svn: 170390
2012-12-18 00:31:01 +00:00
Eric Christopher
41e750e835 Cleanup formatting and whitespace.
llvm-svn: 170389
2012-12-18 00:30:54 +00:00
Jakob Stoklund Olesen
cfab8733fc Extract a method, no functional change intended.
Sadly, this costs us a perfectly good opportunity to use 'goto'.

llvm-svn: 170385
2012-12-18 00:13:11 +00:00
Jakob Stoklund Olesen
3f8f107cc8 Tighten up the erase/remove API for bundled instructions.
Most code is oblivious to bundles and uses the MBB::iterator which only
visits whole bundles. MBB::erase() operates on whole bundles at a time
as before.

MBB::remove() now refuses to remove bundled instructions. It is not safe
to remove all instructions in a bundle without deleting them since there
is no way of returning pointers to all the removed instructions.

MBB::remove_instr() and MBB::erase_instr() will now update bundle flags
correctly, lifting individual instructions out of bundles while leaving
the remaining bundle intact.

The MachineInstr convenience functions are updated so

  eraseFromParent() erases a whole bundle as before
  eraseFromBundle() erases a single instruction, leaving the rest of its bundle.
  removeFromParent() refuses to operate on bundled instructions, and
  removeFromBundle() lifts a single instruction out of its bundle.

These functions will no longer accidentally split or coalesce bundles -
bundle flags are updated to preserve the existing bundling, and explicit
bundleWith* / unbundleFrom* functions should be used to change the
instruction bundling.

This API update is still a work in progress. I am going to update APIs
first so they maintain bundle flags automatically when possible. Then
I'll add stricter verification of the bundle flags.

llvm-svn: 170384
2012-12-17 23:55:38 +00:00
Reed Kotler
908c8b8876 EmitDebugLabel should by default be the same as EmitLabel everywhere.
It must be explicity set in MCPureStreamer because otherwise it will
inherit incorrectly from the parent.

llvm-svn: 170383
2012-12-17 23:41:45 +00:00
Eli Bendersky
689b282ca8 fix indentation
llvm-svn: 170381
2012-12-17 22:50:56 +00:00