Nadav Rotem [Fri, 9 Nov 2012 07:02:24 +0000 (07:02 +0000)]
indent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167607
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 8 Nov 2012 20:34:25 +0000 (20:34 +0000)]
llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167595
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 8 Nov 2012 13:58:10 +0000 (13:58 +0000)]
Drop the limitation to IEEE floating point types from the fdiv of pow2 -> fmul transform.
This is safe for x87 long doubles and ppc double doubles too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167582
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Thu, 8 Nov 2012 09:51:45 +0000 (09:51 +0000)]
Recommit modified r167540.
Improve ARM build attribute emission for architectures types.
This also changes the default architecture emitted for a generic CPU to "v7".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167574
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 8 Nov 2012 07:28:54 +0000 (07:28 +0000)]
Add support of RTM from TSX extension
- Add RTM code generation support throught 3 X86 intrinsics:
xbegin()/xend() to start/end a transaction region, and xabort() to abort a
tranaction region
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167573
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 8 Nov 2012 01:33:50 +0000 (01:33 +0000)]
instcombine: Migrate strspn optimizations
This patch migrates the strspn optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167568
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 7 Nov 2012 23:38:51 +0000 (23:38 +0000)]
Fix up comment typo and 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167560
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 7 Nov 2012 23:22:07 +0000 (23:22 +0000)]
Add a relocation visitor to lib object. This works via caching relocated
values in a map that can be passed to consumers. Add a testcase that
ensures this works for llvm-dwarfdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167558
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 7 Nov 2012 21:35:12 +0000 (21:35 +0000)]
Only do switch-to-lookup table transformation when TargetTransformInfo
is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167552
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 7 Nov 2012 19:10:58 +0000 (19:10 +0000)]
[mips] Custom-lower ISD::FRAME_TO_ARGS_OFFSET node.
Patch by Sasa Stankovic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167548
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 7 Nov 2012 19:04:26 +0000 (19:04 +0000)]
Delete MipsFunctionInfo::NextStackOffset. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167546
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Wed, 7 Nov 2012 18:57:14 +0000 (18:57 +0000)]
Revert r167540 until regression tests are updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167545
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 7 Nov 2012 18:39:32 +0000 (18:39 +0000)]
Remove accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167544
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 7 Nov 2012 18:38:24 +0000 (18:38 +0000)]
Fix bad test IR in switch_to_lookup_table.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167543
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Wed, 7 Nov 2012 18:01:03 +0000 (18:01 +0000)]
Improve ARM build attribute emission for architectures types.
This also changes the default architecture emitted for a generic CPU to "v7".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167540
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Wodnicki [Wed, 7 Nov 2012 17:00:18 +0000 (17:00 +0000)]
fix typo PR1476
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167536
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Wodnicki [Wed, 7 Nov 2012 16:56:52 +0000 (16:56 +0000)]
fix for PR1476
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167535
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 7 Nov 2012 12:42:18 +0000 (12:42 +0000)]
[asan] fix bug 14277 (asan needs to fail with fata error if an __asan interface function is being redefined. Before this fix asan asserts)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167529
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Nov 2012 07:05:09 +0000 (07:05 +0000)]
misched: Heuristics based on the machine model.
misched is disabled by default. With -enable-misched, these heuristics
balance the schedule to simultaneously avoid saturating processor
resources, expose ILP, and minimize register pressure. I've been
analyzing the performance of these heuristics on everything in the
llvm test suite in addition to a few other benchmarks. I would like
each heuristic check to be verified by a unit test, but I'm still
trying to figure out the best way to do that. The heuristics are still
in considerable flux, but as they are refined we should be rigorous
about unit testing the improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167527
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 7 Nov 2012 07:05:05 +0000 (07:05 +0000)]
misched: handle on-the-fly regpressure queries better for 2-addr
instructions without relying on liveintervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167526
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 7 Nov 2012 05:19:04 +0000 (05:19 +0000)]
Add comment describing what's going on here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167525
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 7 Nov 2012 04:42:18 +0000 (04:42 +0000)]
When we're updating the subprogram scope DIE, we want to determine if we're
updating an abstract DIE or not. If we are, then we use that. Its children will
be added on later, as well as the object pointer attribute. Otherwise, this
function may be called with a concrete DIE twice and adding the children and
object pointer attribute to it twice.
<rdar://problem/
12401423&
12600340>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167524
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 7 Nov 2012 01:52:41 +0000 (01:52 +0000)]
Fix a broken sentence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167521
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 7 Nov 2012 01:41:30 +0000 (01:41 +0000)]
Document the -input-file option of FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167517
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 7 Nov 2012 00:13:01 +0000 (00:13 +0000)]
[arm fast-isel] Appease the machine verifier by using the proper register
classes. For my test case the number of errors drop from 356 to 21.
Part of rdar://
12594152
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167508
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 6 Nov 2012 23:52:19 +0000 (23:52 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167505
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 6 Nov 2012 23:36:00 +0000 (23:36 +0000)]
Make the helper functions static. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167501
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 6 Nov 2012 23:05:24 +0000 (23:05 +0000)]
Mark the Int_eh_sjlj_dispatchsetup pseudo instruction as clobbering all
registers. Previously, the register we being marked as implicitly defined, but
not killed. In some cases this would cause the register scavenger to spill a
dead register.
Also, use an empty register mask to simplify the logic and to reduce the memory
footprint.
rdar://
12592448
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167499
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 6 Nov 2012 22:52:42 +0000 (22:52 +0000)]
[regallocfast] Make sure the MachineRegisterInfo is aware of clobbers from a
register masks. This is an obvious and necessary fix for a soon to be committed
patch. No test case possible at this time. Reviewed by Jakob.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167498
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 6 Nov 2012 21:17:17 +0000 (21:17 +0000)]
CostModel: add another known vector trunc optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167488
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 6 Nov 2012 19:54:46 +0000 (19:54 +0000)]
[c-index-test] When building with BUILD_CLANG_ONLY=YES, include c-index-test.
It is part of libclang and has other uses besides running the clang tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167484
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 6 Nov 2012 19:33:53 +0000 (19:33 +0000)]
Cost Model: add tables for some avx type-conversion hacks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167480
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Tue, 6 Nov 2012 19:06:46 +0000 (19:06 +0000)]
Fix build error from previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167477
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Tue, 6 Nov 2012 18:51:59 +0000 (18:51 +0000)]
Add interface for object-based JIT events.
This patch adds the interface to expose events from MCJIT when an object is emitted or freed and implements the MCJIT functionality to send those events. The IntelJITEventListener implementation is left empty for now. It will be fleshed out in a future patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167475
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 6 Nov 2012 17:08:09 +0000 (17:08 +0000)]
MemoryBuffer: Windows doesn't define S_IFIFO.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167467
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 6 Nov 2012 15:04:37 +0000 (15:04 +0000)]
docs: use code font for console commands in phabricator manual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167459
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 6 Nov 2012 08:06:35 +0000 (08:06 +0000)]
Remove tailing whitespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167445
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 6 Nov 2012 07:10:38 +0000 (07:10 +0000)]
misched: TargetSchedule interface for machine resources.
Expose the processor resources defined by the machine model to the
scheduler and other clients through the TargetSchedule interface.
Normalize each resource count with respect to other kinds of
resources. This allows scheduling heuristics to balance resources
against other kinds of resources and latency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167444
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 6 Nov 2012 07:10:34 +0000 (07:10 +0000)]
misched: Rename RemainingCount to avoid confusion with remaining resources.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167443
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 6 Nov 2012 03:13:46 +0000 (03:13 +0000)]
ScheduleDAG interface. Added OrderKind to distinguish nonregister dependencies.
This is in preparation for adding "weak" DAG edges, but generally
simplifies the design.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167435
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 5 Nov 2012 23:57:45 +0000 (23:57 +0000)]
Refactor the getTypeLegalizationCost interface. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167422
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 5 Nov 2012 23:48:20 +0000 (23:48 +0000)]
CostModel: Add tables for the common x86 compares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167421
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 5 Nov 2012 22:20:53 +0000 (22:20 +0000)]
Code Model: Improve the accuracy of the zext/sext/trunc vector cost estimation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167412
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Mon, 5 Nov 2012 22:01:44 +0000 (22:01 +0000)]
Suppress signed/unsigned comparison warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167410
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 5 Nov 2012 21:55:41 +0000 (21:55 +0000)]
Fix for PR14264 cause by commit r167237 which did not take into account a
possible buffer change with a .macro directive.
rdar://
12637628
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167408
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 5 Nov 2012 21:55:40 +0000 (21:55 +0000)]
MemoryBuffer: Support reading named pipes in getFile().
- We only support this when the client didn't claim to know the file size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167407
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 5 Nov 2012 21:12:13 +0000 (21:12 +0000)]
Cost Model: Normalize the insert/extract index when splitting types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167402
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 5 Nov 2012 21:11:10 +0000 (21:11 +0000)]
Cost Model: teach the cost model about expanding integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167401
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 5 Nov 2012 20:57:16 +0000 (20:57 +0000)]
Add a method to indicate section address re-assignment is finished.
Prior to this patch RuntimeDyld attempted to re-apply relocations every time reassignSectionAddress was called (via MCJIT::mapSectionAddress). In addition to being inefficient and redundant, this led to a problem when a section was temporarily moved too far away from another section with a relative relocation referencing the section being moved. To fix this, I'm adding a new method (finalizeObject) which the client can call to indicate that it is finished rearranging section addresses so the relocations can safely be applied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167400
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 5 Nov 2012 19:39:45 +0000 (19:39 +0000)]
On PowerPC64, integer return values (as well as arguments) are supposed
to be extended to a full register. This is modeled in the IR by marking
the return value (or argument) with a signext or zeroext attribute.
However, while these attributes are respected for function arguments,
they are currently ignored for function return values by the PowerPC
back-end. This patch updates PPCCallingConv.td to ask for the promotion
to i64, and fixes LowerReturn and LowerCallResult to implement it.
The new test case verifies that both arguments and return values are
properly extended when passing them; and also that the optimizers
understand incoming argument and return values are in fact guaranteed
by the ABI to be extended.
The patch caused a spurious breakage in CodeGen/PowerPC/coalesce-ext.ll,
since the test case used a "ret" instruction to create a use of an i32
value at the end of the function (to set up data flow as required for
what the test is intended to test). Since there's now an implicit
promotion to i64, that data flow no longer works as expected. To fix
this, this patch now adds an extra "add" to ensure we have an appropriate
use of the i32 value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167396
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 5 Nov 2012 19:32:46 +0000 (19:32 +0000)]
Implement the cost of abnormal x86 instruction lowering as a table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167395
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 5 Nov 2012 19:06:05 +0000 (19:06 +0000)]
lli: Initialize the native asm parser for inline assembly.
MCJIT supports inline assembly, but requires the asm parser to do so.
Make sure to link it in and initialize it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167392
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 5 Nov 2012 18:18:42 +0000 (18:18 +0000)]
Add support for the PowerPC-specific inline asm Z constraint and y modifier.
The Z constraint specifies an r+r memory address, and the y modifier expands
to the "r, r" in the asm string. For this initial implementation, the base
register is forced to r0 (which has the special meaning of 0 for r+r addressing
on PowerPC) and the full address is taken in the second register. In the
future, this should be improved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167388
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Mon, 5 Nov 2012 17:15:56 +0000 (17:15 +0000)]
[PATCH] PowerPC: Expand load extend vector operations
This patch expands the SEXTLOAD, ZEXTLOAD, and EXTLOAD operations for
vector types when altivec is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167386
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 5 Nov 2012 14:57:21 +0000 (14:57 +0000)]
Add missing this->. Fixes pr14238.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167383
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Mon, 5 Nov 2012 10:48:24 +0000 (10:48 +0000)]
Don't infer whether a value is captured in the current function from the
'nocapture' attribute.
The nocapture attribute only specifies that no copies are made that
outlive the function. This isn't the same as there being no copies at all.
This fixes PR14045.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167381
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 5 Nov 2012 10:17:00 +0000 (10:17 +0000)]
Add a couple of stubs to the release notes for things I noticed while
clearing out my backlog of commit mail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167380
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Mon, 5 Nov 2012 02:59:23 +0000 (02:59 +0000)]
PR14256: SelectionDAGLowering was renamed to SelectionDAGBuilder a long time ago. Fix references to it in documentation and comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167378
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 5 Nov 2012 00:11:11 +0000 (00:11 +0000)]
ConstantFolding.cpp: Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167377
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 4 Nov 2012 09:02:45 +0000 (09:02 +0000)]
Apply the patch from PR14160. I failed to construct a testcase for this, but
I'm applying it anyway since it seems to be obviously correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167370
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 4 Nov 2012 04:40:08 +0000 (04:40 +0000)]
Remove alignments from folding tables for scalar FMA4 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167366
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 3 Nov 2012 14:04:04 +0000 (14:04 +0000)]
Fix the IntegersSubsetTest unit test when compiled with gcc-4.7. The issue here
is that the unit test doesn't have IntTy equal to APInt, instead it uses a class
derived from APInt. When, as in these lines, an IntTy& reference is returned
but is assigned to an APInt&, the compiler destroys the temporary the IntTy& was
referring to, leaving the APInt& referring to garbage. This causes the unittest
to fail systematically on my machine; it can also be caught by running the test
under valgrind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167356
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 3 Nov 2012 11:44:17 +0000 (11:44 +0000)]
Generalize the transform that boosts GEP indices to the size of a pointer to
also do it for vectors of pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167354
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 3 Nov 2012 00:53:12 +0000 (00:53 +0000)]
[mips] Set flag neverHasSideEffects flag on floating point conversion
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167348
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 3 Nov 2012 00:39:56 +0000 (00:39 +0000)]
X86 CostModel: Add support for a some of the common arithmetic instructions for SSE4, AVX and AVX2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167347
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 3 Nov 2012 00:26:02 +0000 (00:26 +0000)]
[mips] Set flag isAsCheapAsAMove flag on instruction LUi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167345
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 3 Nov 2012 00:17:26 +0000 (00:17 +0000)]
Be careful not to optimize a SELECT_CC into a SETCC post-legalization if the SETCC node would be illegal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167344
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 3 Nov 2012 00:05:43 +0000 (00:05 +0000)]
[mips] Stop reserving register AT and use register scavenger when a scratch
register is needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167341
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 2 Nov 2012 23:36:01 +0000 (23:36 +0000)]
[mips] Do not reserve all 64-bit registers, but only the ones which need to be
reserved. Without this fix, RegScavenger::getRegsAvailable incorrectly
returns an empty set of integer registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167335
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 2 Nov 2012 23:33:23 +0000 (23:33 +0000)]
Include all the fields so we can correctly emit DW_TAG_structure_type for C++ structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167334
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 2 Nov 2012 23:27:16 +0000 (23:27 +0000)]
Add a stub for the x86 cost model impl. Implement a basic cost rule for inserting/extracting from XMM registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167333
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 2 Nov 2012 22:35:50 +0000 (22:35 +0000)]
Remove empty directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167330
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 2 Nov 2012 22:31:56 +0000 (22:31 +0000)]
CostModel: add support for Vector Insert and Extract.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167329
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Nov 2012 22:29:53 +0000 (22:29 +0000)]
remove empty directories
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167328
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 2 Nov 2012 22:20:10 +0000 (22:20 +0000)]
[mips] Fix disassembler test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167326
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 2 Nov 2012 21:48:17 +0000 (21:48 +0000)]
Add a cost model analysis that allows us to estimate the cost of IR-level instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167324
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 2 Nov 2012 21:47:47 +0000 (21:47 +0000)]
Scalar Bitcasts and Truncs are usually free
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167323
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 2 Nov 2012 21:46:42 +0000 (21:46 +0000)]
[mips] Fix bug in test case. Disable machine LICM to prevent instruction from
being moved out of a basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167322
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 2 Nov 2012 21:32:17 +0000 (21:32 +0000)]
Vext Lowering was missing opportunities
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167318
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 2 Nov 2012 21:26:03 +0000 (21:26 +0000)]
[mips] Use register number instead of name to print register $AT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167315
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 2 Nov 2012 21:10:22 +0000 (21:10 +0000)]
[mips] Add function MipsFrameLowering::estimateStackSize.
This function estimates stack size and will be called before
PrologEpilogInserter scans the callee-saved registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167313
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 2 Nov 2012 21:03:58 +0000 (21:03 +0000)]
[mips] Add member field MipsFunctionInfo::IncomingArgSize which holds the size
of the incoming argument area.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167312
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 2 Nov 2012 20:57:36 +0000 (20:57 +0000)]
Fix a build problem with xlc. The error message was
"../llvm-git/utils/TableGen/CodeGenSchedule.cpp", line 1594.12: 1540-0218 (S) The call does not match any parameter list for "operator+".
"../llvm-git/include/llvm/ADT/STLExtras.h", line 130.1: 1540-1283 (I) "template <class _Iterator, class Func> llvm::operator+(mapped_iterator<_Iterator,Func>::difference_type, const mapped_iterator<_Iterator,Func> &)" is not a viable candidate.
Patch by Kai.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167311
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 2 Nov 2012 20:56:25 +0000 (20:56 +0000)]
[mips] Delete MipsFunctionInfo::EmitNOAT. Unconditionally print directive
"set .noat" so that the assembler doesn't issue warnings when register $AT is
used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167310
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 2 Nov 2012 20:54:45 +0000 (20:54 +0000)]
XLC supports the same atomic functions as GCC, use them.
Patch by Kai.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167309
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 2 Nov 2012 19:45:23 +0000 (19:45 +0000)]
Change resolveRelocation parameters so the relocations can find placeholder values in the original object buffer.
Some ELF relocations require adding the a value to the original contents of the object buffer at the specified location. In order to properly handle multiple applications of a relocation, the RuntimeDyld code should be grabbing the original value from the object buffer and writing a new value into the loaded section buffer. This patch changes the parameters passed to resolveRelocations to accommodate this need.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167304
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 2 Nov 2012 18:06:51 +0000 (18:06 +0000)]
Documentation: fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167302
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 2 Nov 2012 12:20:34 +0000 (12:20 +0000)]
Fix whitespaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167295
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 2 Nov 2012 09:02:37 +0000 (09:02 +0000)]
Enable the assertion in getIntPtrType (I've audited all users of this method and
they are now all correct; hopefully the buildbots will agree!).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 2 Nov 2012 08:40:24 +0000 (08:40 +0000)]
Add a testcase to loop-idiom to cover PR14241 when we start handling
strided loops again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167287
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 2 Nov 2012 08:33:25 +0000 (08:33 +0000)]
Revert the switch of loop-idiom to use the new dependence analysis.
The new analysis is not yet ready for prime time. It has a *critical*
flawed assumption, and some troubling shortages of testing. Until it's
been hammered into better shape, let's stick with the working code. This
should be easy to revert itself when the analysis is ready.
Fixes PR14241, a miscompile of any memcpy-able loop which uses a pointer
as the induction mechanism. If you have been seeing miscompiles in this
revision range, you really want to test with this backed out. The
results of this miscompile are a bit subtle as they can lead to
downstream passes concluding things are impossible which are in fact
possible.
Thanks to David Blaikie for the majority of the reduction of this
miscompile. I'll be checking in the test case in a non-revert commit.
Revesions reverted here:
r167045: LoopIdiom: Fix a serious missed optimization: we only turned
top-level loops into memmove.
r166877: LoopIdiom: Add checks to avoid turning memmove into an infinite
loop.
r166875: LoopIdiom: Recognize memmove loops.
r166874: LoopIdiom: Replace custom dependence analysis with
DependenceAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167286
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 2 Nov 2012 07:49:32 +0000 (07:49 +0000)]
Fix an obvious typo that causes an assertion failure when running
test/Transforms/GVN/rle.ll if the (currently disabled) check for a
pointer type in getIntPtrType is turned on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167285
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 2 Nov 2012 05:24:00 +0000 (05:24 +0000)]
Fix sign compare warning. Patch by Mahesha HS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167282
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 2 Nov 2012 01:32:02 +0000 (01:32 +0000)]
libprofile/CommonProfiling.c: Fix according to C89.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167272
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 2 Nov 2012 01:10:15 +0000 (01:10 +0000)]
PGO: allows the profile data file name to be specified by the LLVMPROF_OUTPUT
environment variable.
This allows parallel make for profiling code, without it there are file
collisions as each parallel run uses the default file name.
There is already code in the runtime library to specify the output file name
via the command line, but this only works for programs which already process
argc/argv. This patch builds on that support.
Patch by Alastair Murray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167269
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Thu, 1 Nov 2012 23:49:58 +0000 (23:49 +0000)]
OutputArg: added an index of the original argument to match the change to
InputArg in r165616.
This will enable us to get the actual type for both InputArg and OutputArg.
rdar://
9932559
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167265
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 1 Nov 2012 21:57:27 +0000 (21:57 +0000)]
BBVectorize: Commit the rest of the test-case change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167257
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 1 Nov 2012 21:50:12 +0000 (21:50 +0000)]
BBVectorize: Use target costs for incoming and outgoing values instead of the depth heuristic.
When target cost information is available, compute explicit costs of inserting and
extracting values from vectors. At this point, all costs are estimated using the
target information, and the chain-depth heuristic is not needed. As a result, it is now, by
default, disabled when using target costs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167256
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 1 Nov 2012 19:49:21 +0000 (19:49 +0000)]
Fixed format string to avoid pointer truncation during 64-bit debugging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167247
91177308-0d34-0410-b5e6-
96231b3b80d8
Pranav Bhandarkar [Thu, 1 Nov 2012 19:13:23 +0000 (19:13 +0000)]
Use the relationship models infrastructure to add two relations - getPredOpcode
and getPredNewOpcode. The first relates non predicated instructions with their
predicated forms and the second relates predicated instructions with their
predicate-new forms.
Patch by Jyotsna Verma!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167243
91177308-0d34-0410-b5e6-
96231b3b80d8