Hal Finkel [Mon, 1 Apr 2013 15:37:53 +0000 (15:37 +0000)]
Treat PPCISD::STFIWX like the memory opcode that it is
PPCISD::STFIWX is really a memory opcode, and so it should come after
FIRST_TARGET_MEMORY_OPCODE, and we should use DAG.getMemIntrinsicNode to create
nodes using it.
No functionality change intended (although there could be optimization benefits
from preserving the MMO information).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178468
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 1 Apr 2013 13:46:15 +0000 (13:46 +0000)]
Remove unused typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178462
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Mon, 1 Apr 2013 13:07:05 +0000 (13:07 +0000)]
ARM Scheduler Model: Add resources instructions, map resources in subtargets
Reapply r177968:
After commit 178074 we can now have undefined scheduler variants.
Move the CortexA9 resources into the CortexA9 SchedModel namespace. Define
resource mappings under the CortexA9 SchedModel. Define resources and mappings
for the SwiftModel.
Incooperate Andrew's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178460
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 1 Apr 2013 10:23:49 +0000 (10:23 +0000)]
X86TTI: Add accurate costs for itofp operations, based on the actual instruction counts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178459
91177308-0d34-0410-b5e6-
96231b3b80d8
Joe Abbey [Mon, 1 Apr 2013 02:28:07 +0000 (02:28 +0000)]
Whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178454
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Sun, 31 Mar 2013 19:33:04 +0000 (19:33 +0000)]
R600: Emit native instructions for tex
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178452
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 31 Mar 2013 17:44:09 +0000 (17:44 +0000)]
There is no longer any need to silence this compiler warning as the warning has
been turned off globally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178451
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 31 Mar 2013 14:43:31 +0000 (14:43 +0000)]
Cleanup ImmToIdxMap and noImmForm in PPCRegisterInfo
ImmToIdxMap should be a DenseMap (not a std::map) because there
is no ordering requirement. Also, we don't need a separate list
of instructions for noImmForm in eliminateFrameIndex, because this
list is essentially the complement of the keys in ImmToIdxMap.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178450
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 31 Mar 2013 12:49:15 +0000 (12:49 +0000)]
X86: Promote sitofp <8 x i16> to <8 x i32> when AVX is available.
A vector sext + sitofp is a lot cheaper than 8 scalar conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178448
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 31 Mar 2013 10:12:51 +0000 (10:12 +0000)]
Add the PPC lfiwax instruction
This instruction is available on modern PPC64 CPUs, and is now used
to improve the SINT_TO_FP lowering (by eliminating the need for the
separate sign extension instruction and decreasing the amount of
needed stack space).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178446
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sun, 31 Mar 2013 01:58:02 +0000 (01:58 +0000)]
Cleanup PPC(64) i32 -> float/double conversion
The existing SINT_TO_FP code for i32 -> float/double conversion was disabled
because it relied on broken EXTSW_32/STD_32 instruction definitions. The
original intent had been to enable these 64-bit instructions to be used on CPUs
that support them even in 32-bit mode. Unfortunately, this form of lying to
the infrastructure was buggy (as explained in the FIXME comment) and had
therefore been disabled.
This re-enables this functionality, using regular DAG nodes, but only when
compiling in 64-bit mode. The old STD_32/EXTSW_32 definitions (which were dead)
are removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178438
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Mar 2013 21:28:18 +0000 (21:28 +0000)]
DAGCombine: visitXOR can replace a node without returning it, bail out in that case.
Fixes the crash reported in PR15608.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178429
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Sat, 30 Mar 2013 16:41:14 +0000 (16:41 +0000)]
Add start of user documentation for NVPTX
Summary: This is the beginning of user documentation for the NVPTX back-end. I want to ensure I am integrating this properly into the rest of the LLVM documentation.
Differential Revision: http://llvm-reviews.chandlerc.com/D600
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178428
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Mar 2013 16:21:50 +0000 (16:21 +0000)]
Change '@SECREL' suffix to GAS-compatible '@SECREL32'.
'@SECREL' is what is used by the Microsoft assembler, but GNU as expects '@SECREL32'.
With the patch, the MC-generated code works fine in combination with a recent GNU as (2.23.51.
20120920 here).
Patch by David Nadlinger!
Differential Revision: http://llvm-reviews.chandlerc.com/D429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178427
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 30 Mar 2013 15:33:02 +0000 (15:33 +0000)]
[docs] llvmbugs is not the place for patches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178426
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 30 Mar 2013 15:33:01 +0000 (15:33 +0000)]
[docs] Annotate mailing lists with their "name".
Nobody says "the developer's list" or "commits archive"; they always say
"llvmdev" or "llvm-commits". It makes sense for our documentation to
at least make that association explicitly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178425
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 30 Mar 2013 15:32:54 +0000 (15:32 +0000)]
[docs] Reorganize mailing lists.
Order them roughly by "which one should a newbie join first".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178424
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 30 Mar 2013 15:32:51 +0000 (15:32 +0000)]
[docs] Pull IRC and Mailing Lists under a new "Community" heading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178423
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 30 Mar 2013 15:32:50 +0000 (15:32 +0000)]
[docs] The GEP FAQ is not "design and overview"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178422
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 30 Mar 2013 15:32:47 +0000 (15:32 +0000)]
[docs] Put DeveloperPolicy under "Development Process Documentation"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178421
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Mar 2013 15:23:08 +0000 (15:23 +0000)]
Put private class into an anonmyous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178420
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Sat, 30 Mar 2013 14:29:30 +0000 (14:29 +0000)]
[NVPTX] Remove support for SM < 2.0. This was never fully supported anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178417
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Sat, 30 Mar 2013 14:29:25 +0000 (14:29 +0000)]
[NVPTX] Add NVVMReflect pass to allow compile-time selection of
specific code paths.
This allows us to write code like:
if (__nvvm_reflect("FOO"))
// Do something
else
// Do something else
and compile into a library, then give "FOO" a value at kernel
compile-time so the check becomes a no-op.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178416
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Sat, 30 Mar 2013 14:29:21 +0000 (14:29 +0000)]
[NVPTX] Run clang-format on all NVPTX sources.
Hopefully this resolves any outstanding style issues and gives us
an automated way of ensuring we conform to the style guidelines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178415
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 30 Mar 2013 13:07:51 +0000 (13:07 +0000)]
Object: Turn a couple of degenerate for loops into while loops.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178413
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Sat, 30 Mar 2013 02:15:01 +0000 (02:15 +0000)]
Implement XOR reassociation. It is based on following rules:
rule 1: (x | c1) ^ c2 => (x & ~c1) ^ (c1^c2),
only useful when c1=c2
rule 2: (x & c1) ^ (x & c2) = (x & (c1^c2))
rule 3: (x | c1) ^ (x | c2) = (x & c3) ^ c3 where c3 = c1 ^ c2
rule 4: (x | c1) ^ (x & c2) => (x & c3) ^ c1, where c3 = ~c1 ^ c2
It reduces an application's size (in terms of # of instructions) by 8.9%.
Reviwed by Pete Cooper. Thanks a lot!
rdar://
13212115
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178409
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 02:14:45 +0000 (02:14 +0000)]
[mips] Add patterns for DSP indexed load instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178408
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 02:01:48 +0000 (02:01 +0000)]
[mips] Define reg+imm load/store pattern templates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178407
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:58:00 +0000 (01:58 +0000)]
[mips] Fix DSP instructions to have explicit accumulator register operands.
Check that instruction selection can select multiply-add/sub DSP instructions
from a pattern that doesn't have intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178406
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:46:28 +0000 (01:46 +0000)]
Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178405
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:42:24 +0000 (01:42 +0000)]
[mips] Move the code which does dag-combine for multiply-add/sub nodes to
derived class MipsSETargetLowering.
We shouldn't be generating madd/msub nodes if target is Mips16, since Mips16
doesn't have support for multipy-add/sub instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178404
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:36:35 +0000 (01:36 +0000)]
[mips] Fix definitions of multiply, multiply-add/sub and divide instructions.
The new instructions have explicit register output operands and use table-gen
patterns instead of C++ code to do instruction selection.
Mips16's instructions are unaffected by this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178403
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:16:38 +0000 (01:16 +0000)]
[mips] Remove function getFPBranchCodeFromCond. Rename invertFPCondCodeAdd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178396
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:15:17 +0000 (01:15 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178395
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:14:04 +0000 (01:14 +0000)]
[mips] Add mips-specific nodes which will be used to select multiply and divide
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178394
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:12:05 +0000 (01:12 +0000)]
[mips] Implement getRepRegClassFor in MipsSETargetLowering. This function is
called in several places in ScheduleDAGRRList.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178393
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:08:05 +0000 (01:08 +0000)]
[mips] Fix MipsSEInstrInfo::copyPhysReg, loadRegFromStack and storeRegToStack
to handle accumulator registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178392
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 01:04:11 +0000 (01:04 +0000)]
[mips] Expand pseudo load, store and copy instructions right before
callee-saved scan.
The code makes use of register's scavenger's capability to spill multiple
registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178391
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 30 Mar 2013 00:54:52 +0000 (00:54 +0000)]
[mips] Define pseudo instructions for spilling and copying accumulator
registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178390
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 29 Mar 2013 23:34:06 +0000 (23:34 +0000)]
Use SmallVectorImpl instead of SmallVector at the uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178386
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 29 Mar 2013 23:28:55 +0000 (23:28 +0000)]
Run the ObjCARCContract pass for LTO. <rdar://problem/
13538084>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178385
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 29 Mar 2013 22:44:59 +0000 (22:44 +0000)]
Updated test0 of retain-not-declared.ll to reflect the fact that objc-arc-expand runs before objc-arc/objc-arc-contract.
Specifically, objc-arc-expand will make sure that the
objc_retainAutoreleasedReturnValue, objc_autoreleaseReturnValue, and ret
will all have %call as an argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178382
91177308-0d34-0410-b5e6-
96231b3b80d8
Jean-Luc Duprat [Fri, 29 Mar 2013 22:07:12 +0000 (22:07 +0000)]
SmallVector and SmallPtrSet allocations now power-of-two aligned.
This time tested on both OSX and Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178377
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Fri, 29 Mar 2013 21:57:47 +0000 (21:57 +0000)]
[docs] The STL "binary search" has a non-obvious name.
std::lower_bound is the canonical "binary search" in the STL
(std::binary_search generally is not what you want). The name actually
makes a lot of sense (and also has a beautiful symmetry with the
std::upper_bound algorithm). The name is nonetheless non-obvious.
Also, remove mention of "radix search". It's not even clear how that
would work in the context of a sorted vector. AFAIK "radix search" only
makes sense when you have a trie-like data structure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178376
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Fri, 29 Mar 2013 21:54:00 +0000 (21:54 +0000)]
Exclude the X86/complex-fca.ll test at it probably wasn't supposed to work on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178375
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 29 Mar 2013 21:15:23 +0000 (21:15 +0000)]
Add clang.arc.used to ModuleHasARC so ARC always runs if said call is present in a module.
clang.arc.used is an interesting call for ARC since ObjCARCContract
needs to run to remove said intrinsic to avoid a linker error (since the
call does not exist).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178369
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Fri, 29 Mar 2013 21:09:53 +0000 (21:09 +0000)]
Hexagon: Add emitFrameIndexDebugValue function to emit debug information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178368
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 29 Mar 2013 20:23:06 +0000 (20:23 +0000)]
Use 12 as the magic number for our abbreviation data and our
die values. A lot of DIEs have 10 attributes in C++ code (example
clang), none had more than 12. Seems like a good default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178366
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 29 Mar 2013 20:23:02 +0000 (20:23 +0000)]
Move the construction of the skeleton compile unit after the
entire original compile unit has been constructed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178365
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 29 Mar 2013 20:14:08 +0000 (20:14 +0000)]
move testcase into appropriate X86 subdirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178364
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 29 Mar 2013 19:41:55 +0000 (19:41 +0000)]
Implement FRINT lowering on PPC using frin
Like nearbyint, rint can be implemented on PPC using the frin instruction. The
complication comes from the fact that rint needs to set the FE_INEXACT flag
when the result does not equal the input value (and frin does not do that). As
a result, we use a custom inserter which, after the rounding, compares the
rounded value with the original, and if they differ, explicitly sets the XX bit
in the FPSCR register (which corresponds to FE_INEXACT).
Once LLVM has better modeling of the floating-point environment we should be
able to (often) eliminate this extra complexity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178362
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 29 Mar 2013 19:17:42 +0000 (19:17 +0000)]
[mips] Define a function which returns the GPR register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178359
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 29 Mar 2013 19:08:31 +0000 (19:08 +0000)]
Fix TableGen subtarget-emitter to handle A9/Swift.
A9 uses itinerary classes, Swift uses RW lists. This tripped some
verification when we're expanding variants. I had to refine the
verification a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178357
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 29 Mar 2013 18:48:45 +0000 (18:48 +0000)]
Build fixes for STLPort + GCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178356
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 29 Mar 2013 18:48:42 +0000 (18:48 +0000)]
Fix loop style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178355
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 29 Mar 2013 18:08:14 +0000 (18:08 +0000)]
Split the llvm/tools/clang/test/CodeGenObjC/debug-info-blocks.m testcase into a CFE and LLVM part.
rdar://problem/
12767564
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178353
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 29 Mar 2013 17:14:24 +0000 (17:14 +0000)]
Remove the old CodePlacementOpt pass.
It was superseded by MachineBlockPlacement and disabled by default since LLVM 3.1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178349
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 29 Mar 2013 16:34:23 +0000 (16:34 +0000)]
Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178346
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Fri, 29 Mar 2013 15:46:12 +0000 (15:46 +0000)]
Hexagon: Disable DwarfUsesInlineInfoSection flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178345
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 29 Mar 2013 08:57:48 +0000 (08:57 +0000)]
Add PPC FP rounding instructions fri[mnpz]
These instructions are available on the P5x (and later) and on the A2. They
implement the standard floating-point rounding operations (floor, trunc, etc.).
One caveat: frin (round to nearest) does not implement "ties to even", and so
is only enabled in fast-math mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178337
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 29 Mar 2013 07:11:21 +0000 (07:11 +0000)]
Revert "Fix allocations of SmallVector and SmallPtrSet so they are more prone to"
This reverts commit
617330909f0c26a3f2ab8601a029b9bdca48aa61.
It broke the bots:
/home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:150: PushPopTest
/home/clangbuild2/clang-ppc64-2/llvm.src/unittests/ADT/SmallVectorTest.cpp:118: Failure
Value of: v[i].getValue()
Actual: 0
Expected: value
Which is: 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178334
91177308-0d34-0410-b5e6-
96231b3b80d8
Jean-Luc Duprat [Fri, 29 Mar 2013 05:45:22 +0000 (05:45 +0000)]
Fix allocations of SmallVector and SmallPtrSet so they are more prone to
being power-of-two sized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178332
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 29 Mar 2013 05:13:07 +0000 (05:13 +0000)]
Removed trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178329
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 29 Mar 2013 03:27:21 +0000 (03:27 +0000)]
[mips] Change type of accumulator registers to Untyped. Add two more accumulator
register classes for Mips64 and DSP-ASE.
No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178328
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 29 Mar 2013 02:14:12 +0000 (02:14 +0000)]
[mips] Define overloaded versions of storeRegToStack and loadRegFromStack.
No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178327
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 29 Mar 2013 01:51:04 +0000 (01:51 +0000)]
[mips] Add parameter Alignment to MipsFrameLowering's constructor.
No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178326
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 29 Mar 2013 00:13:08 +0000 (00:13 +0000)]
Revert r178166. According to Howard, this code is actually ok.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178319
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 28 Mar 2013 23:45:13 +0000 (23:45 +0000)]
[Mips Assembler] Add support for OR macro with imediate opperand
Mips assembler supports macros that allows the OR instruction
to have an immediate parameter. This patch adds an instruction
alias that converts this macro into a Mips ORI instruction.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178316
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 28 Mar 2013 23:41:26 +0000 (23:41 +0000)]
Add support of RDSEED defined in AVX2 extension
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178314
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 28 Mar 2013 23:38:52 +0000 (23:38 +0000)]
Enhance boolean simplification to handle 16-/64-bit RDRAND
- RDRAND always clears the destination value when a random value is not
available (i.e. CF == 0). This value is truncated or zero-extended as
the false boolean value to be returned. Boolean simplification needs
to skip this 'zext' or 'trunc' node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178312
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 28 Mar 2013 23:13:21 +0000 (23:13 +0000)]
Skip moving call address loading into callseq when targets prefer register indirect call.
To enable a load of a call address to be folded with that call, this
load is moved from outside of callseq into callseq. Such a moving
adds a non-glued node (that load) into a glued sequence. This non-glue
load is only removed when DAG selection folds them into a memory form
call instruction. When such instruction selection is disabled, it breaks
DAG schedule.
To prevent that, such moving is disabled when target favors register
indirect call.
Previous workaround disabling CALL32m/CALL64m insn selection is removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178308
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 28 Mar 2013 23:08:44 +0000 (23:08 +0000)]
Removed dead code from ObjCARCOpts relating to tracking objc_retainBlocks through the ARC Dataflow analysis. By the time we get to the ARC dataflow analysis, any objc_retainBlock calls are not optimizable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178306
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 28 Mar 2013 23:04:47 +0000 (23:04 +0000)]
[fast-isel] Add a preemptive fix for the case where we fail to materialize an
immediate in a register. I don't believe this should ever fail, but I see no
harm in trying to make this code bullet proof.
I've added an assert to ensure my assumtion is correct. If the assertion fires
something is wrong and we should fix it, rather then just silently fall back to
SelectionDAG isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178305
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 28 Mar 2013 23:02:21 +0000 (23:02 +0000)]
[Mips Assembler] Add alias definitions for jal
Mips assembler allows following to be used as aliased instructions:
jal $rs for jalr $rs
jal $rd,$rd for jalr $rd,$rs
This patch provides alias definitions in td files and test cases to show the usage.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178304
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 28 Mar 2013 22:54:45 +0000 (22:54 +0000)]
Add the X86 FMAs to the scheduling model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178303
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Mar 2013 22:40:08 +0000 (22:40 +0000)]
Minor simplification.
Go ahead and use the full path for both the .gcno and .gcda files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178302
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 28 Mar 2013 22:34:46 +0000 (22:34 +0000)]
Add the Haswell machine model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178301
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 28 Mar 2013 22:32:41 +0000 (22:32 +0000)]
Remove the unused port from the SandyBridge machine model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178300
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Thu, 28 Mar 2013 22:29:53 +0000 (22:29 +0000)]
Add ADX CPUID detection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178299
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 28 Mar 2013 21:37:18 +0000 (21:37 +0000)]
These two are default in the constructor for MCAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178293
91177308-0d34-0410-b5e6-
96231b3b80d8
Timur Iskhodzhanov [Thu, 28 Mar 2013 21:30:04 +0000 (21:30 +0000)]
Make Win32 put the SRet address into EAX, fixes PR15556
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178291
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 28 Mar 2013 20:35:18 +0000 (20:35 +0000)]
Specify CPUs on the PPC bswap-load-store test
Otherwise, the CHECK-NOT's might trigger depending on the host's CPU.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178287
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 28 Mar 2013 20:23:46 +0000 (20:23 +0000)]
Only enable 64-bit bswap DAG combines for PPC64
Compiling in 32-bit mode on a P7 would assert after 64-bit DAG combines were
added for bswap with load/store. This is because these combines are really only
valid in 64-bit mode, regardless of the CPU (and this was not being checked).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178286
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 28 Mar 2013 20:11:30 +0000 (20:11 +0000)]
Non optimizable objc_retainBlock calls are not forwarding.
Since we handle optimizable objc_retainBlocks through strength reduction
in OptimizableIndividualCalls, we know that all code after that point
will only see non-optimizable objc_retainBlock calls. IsForwarding is
only called by functions after that point, so it is ok to just classify
objc_retainBlock as non-forwarding.
<rdar://problem/
13249661>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178285
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Thu, 28 Mar 2013 20:11:19 +0000 (20:11 +0000)]
[ObjCARC] Strength reduce objc_retainBlock -> objc_retain if the objc_retainBlock is optimizable.
If an objc_retainBlock has the copy_on_escape metadata attached to it
AND if the block pointer argument only escapes down the stack, we are
allowed to strength reduce the objc_retainBlock to to an objc_retain and
thus optimize it.
Current there is logic in the ARC data flow analysis to handle
this case which is complicated and involved making distinctions in
between objc_retainBlock and objc_retain in certain places and
considering them the same in others.
This patch simplifies said code by:
1. Performing the strength reduction in the initial ARC peephole
analysis (ObjCARCOpts::OptimizeIndividualCalls).
2. Changes the ARC dataflow analysis (which runs after the peephole
analysis) to consider all objc_retainBlock calls to not be optimizable
(since if the call was optimizable, we would have strength reduced it
already).
This patch leaves in the infrastructure in the ARC dataflow analysis to
handle this case, which due to 2 will just be dead code. I am doing this
on purpose to separate the removal of the old code from the testing of
the new code.
<rdar://problem/
13249661>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178284
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 28 Mar 2013 19:44:04 +0000 (19:44 +0000)]
Hexagon: Replace switch-case in isDotNewInst with TSFlags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178281
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 28 Mar 2013 19:43:12 +0000 (19:43 +0000)]
Fix bad indentation in r178276
Thanks to Bill Schmidt for pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178280
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 28 Mar 2013 19:34:49 +0000 (19:34 +0000)]
Hexagon: Enable SupportDebugInfomation and DwarfInSection flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178279
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 28 Mar 2013 19:34:14 +0000 (19:34 +0000)]
Remove -O3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178278
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 28 Mar 2013 19:27:24 +0000 (19:27 +0000)]
Use direct types in most PowerPC Altivec instructions and patterns.
This follows up Ulrich Weigand's work in PPCInstrInfo.td and
PPCInstr64Bit.td by doing the corresponding work for most of the
Altivec patterns. I have not been able to do anything for the
following classes of instructions:
(1) Vector logicals. These don't have corresponding intrinsics and
don't have a single obvious vector type. So far as I can tell I need
to leave these as VRRC. Affected instructions are: VAND, VANDC,
VNOR, VOR, VXOR, V_SET0.
(2) Instructions that make use of vector shuffle. The selection code
promotes all shuffles to v16i8, so any pattern that matches on a
shuffle is constrained. I haven't found any way to make the patterns
match on their natural types, so I plan to leave these as VRRC.
Affected instructions are: VMRG*, VSPLTB, VSPLTH, VSPLTW, VPKUHUM,
VPKUWUM.
No change in behavior is anticipated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178277
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 28 Mar 2013 19:25:55 +0000 (19:25 +0000)]
Add the PPC64 ldbrx/stdbrx instructions
These are 64-bit load/store with byte-swap, and available on the P7 and the A2.
Like the similar instructions for 16- and 32-bit words, these are matched in the
target DAG-combine phase against load/store-bswap pairs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178276
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Keiser [Thu, 28 Mar 2013 19:22:28 +0000 (19:22 +0000)]
Fix issue with disassembler decoding CBZ/CBNZ immediates as negatives when the upper bit is set.
They should always be zero-extended, not sign extended. Added test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178275
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Keiser [Thu, 28 Mar 2013 18:26:15 +0000 (18:26 +0000)]
Testing commit access to llvm. Remove two lines of whitespace from the Thumb README.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178256
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Schwinge [Thu, 28 Mar 2013 18:06:20 +0000 (18:06 +0000)]
Correct spelling of Git.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178254
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 28 Mar 2013 17:01:28 +0000 (17:01 +0000)]
Move test since it depends on the X86 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178249
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 28 Mar 2013 16:25:57 +0000 (16:25 +0000)]
Hexagon: Use multiclass for gp-relative instructions.
Remove noV4T gp-relative instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178246
91177308-0d34-0410-b5e6-
96231b3b80d8
Howard Hinnant [Thu, 28 Mar 2013 15:47:50 +0000 (15:47 +0000)]
Seciton 24.2.2 of the C++ standard, [iterator.iterators], Table 106
requires that the return type of *r for all iterators r be reference,
where reference is defined in [iterator.requirements.general]/p11 as
iterator_traits<X>::reference, and X is the type of r.
But in CFG.h, the dereference operator of PredIterator and SuccIterator
return pointer, not reference.
Furthermore the nested type reference is value_type&, which is not the
type returned from operator*().
This patch simply makes the iterator::reference type value_type*, which
is what the operator*() returns, and then re-lables the return type as
reference.
From a functionality point of view, the only difference is that the
nested reference type is now value_type* instead of value_type&.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178240
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 28 Mar 2013 14:30:46 +0000 (14:30 +0000)]
AArch64: implement GICv3 system registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178236
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 28 Mar 2013 13:29:47 +0000 (13:29 +0000)]
Add the PPC64 popcntd instruction
PPC ISA 2.06 (P7, A2, etc.) has a popcntd instruction. Add this instruction and
tell TTI about it so that popcount-loop recognition will know about it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178233
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 28 Mar 2013 11:21:13 +0000 (11:21 +0000)]
[tsan] make sure memset/memcpy/memmove are not inlined in tsan mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178230
91177308-0d34-0410-b5e6-
96231b3b80d8