platform/upstream/llvm.git
11 years agoRemove unused internal linkage variable.
Richard Smith [Tue, 27 Nov 2012 21:51:36 +0000 (21:51 +0000)]
Remove unused internal linkage variable.

llvm-svn: 168729

11 years ago[arm fast-isel] Appease the machine verifier by using the proper register
Chad Rosier [Tue, 27 Nov 2012 21:46:46 +0000 (21:46 +0000)]
[arm fast-isel] Appease the machine verifier by using the proper register
classes.  Also a bit of cleanup.
rdar://12719844

llvm-svn: 168728

11 years agoMark expected failures on Linux (due to bugzilla #14437)
Daniel Malea [Tue, 27 Nov 2012 21:33:41 +0000 (21:33 +0000)]
Mark expected failures on Linux (due to bugzilla #14437)

llvm-svn: 168727

11 years agoAllow an ASTConsumer to selectively skip function bodies while parsing. Patch
Richard Smith [Tue, 27 Nov 2012 21:31:01 +0000 (21:31 +0000)]
Allow an ASTConsumer to selectively skip function bodies while parsing. Patch
by Olivier Goffart!

llvm-svn: 168726

11 years agoSimplify checking for whether we should implicitly declare special members and
Richard Smith [Tue, 27 Nov 2012 21:20:31 +0000 (21:20 +0000)]
Simplify checking for whether we should implicitly declare special members and
add some assertions. No functionality change.

llvm-svn: 168725

11 years agodo not execute the OpenMP tests when cloog is not found
Sebastian Pop [Tue, 27 Nov 2012 21:15:15 +0000 (21:15 +0000)]
do not execute the OpenMP tests when cloog is not found

llvm-svn: 168724

11 years agoAdd -verify-machineinstrs to these fast-isel test cases.
Chad Rosier [Tue, 27 Nov 2012 20:49:56 +0000 (20:49 +0000)]
Add -verify-machineinstrs to these fast-isel test cases.

llvm-svn: 168723

11 years agoModifying lli to use the SectionMemoryManager.
Andrew Kaylor [Tue, 27 Nov 2012 19:49:00 +0000 (19:49 +0000)]
Modifying lli to use the SectionMemoryManager.

The functionality of SectionMemoryManager is equivalent to the LLIMCJITMemoryManager being replaced except that it allocates memory as RW and later changes it to RX or R as needed.  The page permissions are set in the call to MCJIT::finalizeObject.

llvm-svn: 168722

11 years agoMoving SectionMemoryManager into RuntimeDyld and adding unit tests for it.
Andrew Kaylor [Tue, 27 Nov 2012 19:42:02 +0000 (19:42 +0000)]
Moving SectionMemoryManager into RuntimeDyld and adding unit tests for it.

The SectionMemoryManager now supports (and requires) applying section-specific page permissions.  Clients using this memory manager must call either MCJIT::finalizeObject() or SectionMemoryManager::applyPermissions() before executing JITed code.

See r168718 for changes from the previous implementation.

llvm-svn: 168721

11 years ago<rdar://problem/12759744> Provide physical memory distribution as part of profile...
Han Ming Ong [Tue, 27 Nov 2012 19:21:03 +0000 (19:21 +0000)]
<rdar://problem/12759744> Provide physical memory distribution as part of profile data

Make use of unix system calls to provide physical memory usage profile data.

llvm-svn: 168720

11 years agoModified depends() to recognize that when all levels are "=" and
Preston Briggs [Tue, 27 Nov 2012 19:12:26 +0000 (19:12 +0000)]
Modified depends() to recognize that when all levels are "=" and
there's no possible loo-independent dependence, then there's no
dependence.

Updated all test result appropriately.

llvm-svn: 168719

11 years agoImplementing page permission setting in MCJIT unit test SectionMemoryManager.cpp
Andrew Kaylor [Tue, 27 Nov 2012 19:00:17 +0000 (19:00 +0000)]
Implementing page permission setting in MCJIT unit test SectionMemoryManager.cpp

This commit is primarily here for the revision history.  I'm about to move the SectionMemoryManager into the RuntimeDyld library, but I wanted to check the changes in here so people could see the differences in the updated implementation.

llvm-svn: 168718

11 years agoCSE: allow PerformTrivialCoalescing to check copies across basic block
Manman Ren [Tue, 27 Nov 2012 18:58:41 +0000 (18:58 +0000)]
CSE: allow PerformTrivialCoalescing to check copies across basic block
boundaries.

Given the following case:
BB0
  %vreg1<def> = SUBrr %vreg0, %vreg7
  %vreg2<def> = COPY %vreg7
BB1
  %vreg10<def> = SUBrr %vreg0, %vreg2
We should be able to CSE between SUBrr in BB0 and SUBrr in BB1.

rdar://12462006

llvm-svn: 168717

11 years agoinstcombine: Don't replace all uses for instructions with no uses
Meador Inge [Tue, 27 Nov 2012 18:52:49 +0000 (18:52 +0000)]
instcombine: Don't replace all uses for instructions with no uses

My commit to migrate the printf simplifiers from the simplify-libcalls
in r168604 introduced a regression reported by Duncan [1].  The problem
is that in some cases the library call simplifier can return a new value
that has no uses and the new value's type is different than the old value's
type (which is fine because there are no uses).  The specific case that
triggered the bug looked something like:

   declare void @printf(i8*, ...)
   ...
   call void (i8*, ...)* @printf(i8* %fmt)

Which we want to optimized into:

   call i32 @putchar(i32 104)

However, the code was attempting to replace all uses of the printf with
the putchar and the types differ, hence a crash.  This is fixed by *just*
deleting the original instruction when there are no uses.  The old
simplify-libcalls pass is already doing something similar.

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

llvm-svn: 168716

11 years agoFix type-o.
Howard Hinnant [Tue, 27 Nov 2012 18:52:32 +0000 (18:52 +0000)]
Fix type-o.

llvm-svn: 168715

11 years agomake IslAstInfo::printScop compatible with CloogInfo::printScop
Sebastian Pop [Tue, 27 Nov 2012 18:50:41 +0000 (18:50 +0000)]
make IslAstInfo::printScop compatible with CloogInfo::printScop

llvm-svn: 168714

11 years agoRemove by-chapter breakdown of what is implemented. The chart is now obsolete.
Howard Hinnant [Tue, 27 Nov 2012 18:35:09 +0000 (18:35 +0000)]
Remove by-chapter breakdown of what is implemented.  The chart is now obsolete.

llvm-svn: 168713

11 years agoRemove duplicated #includes.
Jakub Staszak [Tue, 27 Nov 2012 18:27:14 +0000 (18:27 +0000)]
Remove duplicated #includes.

llvm-svn: 168712

11 years agoSCEV: Even if the latch terminator is foldable we can't deduce the result of an unrel...
Benjamin Kramer [Tue, 27 Nov 2012 18:16:32 +0000 (18:16 +0000)]
SCEV: Even if the latch terminator is foldable we can't deduce the result of an unrelated condition with it.

Fixes PR14432.

llvm-svn: 168711

11 years agoX86: do not fold load instructions such as [V]MOVS[S|D] to other instructions
Manman Ren [Tue, 27 Nov 2012 18:09:26 +0000 (18:09 +0000)]
X86: do not fold load instructions such as [V]MOVS[S|D] to other instructions
when the destination register is wider than the memory load.

These load instructions load from m32 or m64 and set the upper bits to zero,
while the folded instructions may accept m128.

rdar://12721174

llvm-svn: 168710

11 years agoTest commit only modifying comments
Pedro Artigas [Tue, 27 Nov 2012 17:39:20 +0000 (17:39 +0000)]
Test commit only modifying comments

llvm-svn: 168709

11 years agoThis patch implements medium code model support for 64-bit PowerPC.
Bill Schmidt [Tue, 27 Nov 2012 17:35:46 +0000 (17:35 +0000)]
This patch implements medium code model support for 64-bit PowerPC.

The default for 64-bit PowerPC is small code model, in which TOC entries
must be addressable using a 16-bit offset from the TOC pointer.  Additionally,
only TOC entries are addressed via the TOC pointer.

With medium code model, TOC entries and data sections can all be addressed
via the TOC pointer using a 32-bit offset.  Cooperation with the linker
allows 16-bit offsets to be used when these are sufficient, reducing the
number of extra instructions that need to be executed.  Medium code model
also does not generate explicit TOC entries in ".section toc" for variables
that are wholly internal to the compilation unit.

Consider a load of an external 4-byte integer.  With small code model, the
compiler generates:

ld 3, .LC1@toc(2)
lwz 4, 0(3)

.section .toc,"aw",@progbits
.LC1:
.tc ei[TC],ei

With medium model, it instead generates:

addis 3, 2, .LC1@toc@ha
ld 3, .LC1@toc@l(3)
lwz 4, 0(3)

.section .toc,"aw",@progbits
.LC1:
.tc ei[TC],ei

Here .LC1@toc@ha is a relocation requesting the upper 16 bits of the
32-bit offset of ei's TOC entry from the TOC base pointer.  Similarly,
.LC1@toc@l is a relocation requesting the lower 16 bits.  Note that if
the linker determines that ei's TOC entry is within a 16-bit offset of
the TOC base pointer, it will replace the "addis" with a "nop", and
replace the "ld" with the identical "ld" instruction from the small
code model example.

Consider next a load of a function-scope static integer.  For small code
model, the compiler generates:

ld 3, .LC1@toc(2)
lwz 4, 0(3)

.section .toc,"aw",@progbits
.LC1:
.tc test_fn_static.si[TC],test_fn_static.si
.type test_fn_static.si,@object
.local test_fn_static.si
.comm test_fn_static.si,4,4

For medium code model, the compiler generates:

addis 3, 2, test_fn_static.si@toc@ha
addi 3, 3, test_fn_static.si@toc@l
lwz 4, 0(3)

.type test_fn_static.si,@object
.local test_fn_static.si
.comm test_fn_static.si,4,4

Again, the linker may replace the "addis" with a "nop", calculating only
a 16-bit offset when this is sufficient.

Note that it would be more efficient for the compiler to generate:

addis 3, 2, test_fn_static.si@toc@ha
        lwz 4, test_fn_static.si@toc@l(3)

The current patch does not perform this optimization yet.  This will be
addressed as a peephole optimization in a later patch.

For the moment, the default code model for 64-bit PowerPC will remain the
small code model.  We plan to eventually change the default to medium code
model, which matches current upstream GCC behavior.  Note that the different
code models are ABI-compatible, so code compiled with different models will
be linked and execute correctly.

I've tested the regression suite and the application/benchmark test suite in
two ways:  Once with the patch as submitted here, and once with additional
logic to force medium code model as the default.  The tests all compile
cleanly, with one exception.  The mandel-2 application test fails due to an
unrelated ABI compatibility with passing complex numbers.  It just so happens
that small code model was incredibly lucky, in that temporary values in
floating-point registers held the expected values needed by the external
library routine that was called incorrectly.  My current thought is to correct
the ABI problems with _Complex before making medium code model the default,
to avoid introducing this "regression."

Here are a few comments on how the patch works, since the selection code
can be difficult to follow:

The existing logic for small code model defines three pseudo-instructions:
LDtoc for most uses, LDtocJTI for jump table addresses, and LDtocCPT for
constant pool addresses.  These are expanded by SelectCodeCommon().  The
pseudo-instruction approach doesn't work for medium code model, because
we need to generate two instructions when we match the same pattern.
Instead, new logic in PPCDAGToDAGISel::Select() intercepts the TOC_ENTRY
node for medium code model, and generates an ADDIStocHA followed by either
a LDtocL or an ADDItocL.  These new node types correspond naturally to
the sequences described above.

The addis/ld sequence is generated for the following cases:
 * Jump table addresses
 * Function addresses
 * External global variables
 * Tentative definitions of global variables (common linkage)

The addis/addi sequence is generated for the following cases:
 * Constant pool entries
 * File-scope static global variables
 * Function-scope static variables

Expanding to the two-instruction sequences at select time exposes the
instructions to subsequent optimization, particularly scheduling.

The rest of the processing occurs at assembly time, in
PPCAsmPrinter::EmitInstruction.  Each of the instructions is converted to
a "real" PowerPC instruction.  When a TOC entry needs to be created, this
is done here in the same manner as for the existing LDtoc, LDtocJTI, and
LDtocCPT pseudo-instructions (I factored out a new routine to handle this).

I had originally thought that if a TOC entry was needed for LDtocL or
ADDItocL, it would already have been generated for the previous ADDIStocHA.
However, at higher optimization levels, the ADDIStocHA may appear in a
different block, which may be assembled textually following the block
containing the LDtocL or ADDItocL.  So it is necessary to include the
possibility of creating a new TOC entry for those two instructions.

Note that for LDtocL, we generate a new form of LD called LDrs.  This
allows specifying the @toc@l relocation for the offset field of the LD
instruction (i.e., the offset is replaced by a SymbolLo relocation).
When the peephole optimization described above is added, we will need
to do similar things for all immediate-form load and store operations.

The seven "mcm-n.ll" test cases are kept separate because otherwise the
intermingling of various TOC entries and so forth makes the tests fragile
and hard to understand.

The above assumes use of an external assembler.  For use of the
integrated assembler, new relocations are added and used by
PPCELFObjectWriter.  Testing is done with "mcm-obj.ll", which tests for
proper generation of the various relocations for the same sequences
tested with the external assembler.

llvm-svn: 168708

11 years agoRemove an extra semicolon.
Chad Rosier [Tue, 27 Nov 2012 17:31:26 +0000 (17:31 +0000)]
Remove an extra semicolon.

llvm-svn: 168707

11 years agoFix examples.
Rafael Espindola [Tue, 27 Nov 2012 16:16:02 +0000 (16:16 +0000)]
Fix examples.

llvm-svn: 168705

11 years agoNever use .lcomm on platforms where it does not accept an alignment
Ulrich Weigand [Tue, 27 Nov 2012 16:11:16 +0000 (16:11 +0000)]
Never use .lcomm on platforms where it does not accept an alignment
argument.  Instead, use a pair of .local and .comm directives.

This avoids spurious differences between binaries built by the
integrated assembler vs. those built by the external assembler,
since the external assembler may impose alignment requirements
on .lcomm symbols where the integrated assembler does not.

llvm-svn: 168704

11 years agoRemove some dead code. CLANG_IS_PRODUCTION is now just a build flag and
Rafael Espindola [Tue, 27 Nov 2012 16:10:37 +0000 (16:10 +0000)]
Remove some dead code. CLANG_IS_PRODUCTION is now just a build flag and
is not used in any #ifdef.

llvm-svn: 168703

11 years agoMove sprintf simplifier tests to test/Transforms/InstCombine
Meador Inge [Tue, 27 Nov 2012 15:35:58 +0000 (15:35 +0000)]
Move sprintf simplifier tests to test/Transforms/InstCombine

The tests from SPrintF.ll should have been migrated to sprintf-1.ll in
r168677, but I forgot to do it.

llvm-svn: 168702

11 years agoAdd -fsanitize=integer for reporting suspicious integer behaviors.
Will Dietz [Tue, 27 Nov 2012 15:01:55 +0000 (15:01 +0000)]
Add -fsanitize=integer for reporting suspicious integer behaviors.

Introduces new sanitizer "unsigned-integer-overflow".

llvm-svn: 168701

11 years agoubsan: Support unsigned overflows, and divide-by-zero int/float split.
Will Dietz [Tue, 27 Nov 2012 15:01:43 +0000 (15:01 +0000)]
ubsan: Support unsigned overflows, and divide-by-zero int/float split.

llvm-svn: 168700

11 years agoRemove outdated FIXME; should have removed that in r160782
Timur Iskhodzhanov [Tue, 27 Nov 2012 12:55:47 +0000 (12:55 +0000)]
Remove outdated FIXME; should have removed that in r160782

llvm-svn: 168698

11 years agotsan: fix macro mess
Dmitry Vyukov [Tue, 27 Nov 2012 12:51:16 +0000 (12:51 +0000)]
tsan: fix macro mess

llvm-svn: 168697

11 years agoRemove the dependent libraries feature.
Bill Wendling [Tue, 27 Nov 2012 09:55:56 +0000 (09:55 +0000)]
Remove the dependent libraries feature.

The dependent libraries feature was never used and has bit-rotted. Remove it.

llvm-svn: 168694

11 years agotsan: fix compilation for dead old compilers (why we are supporting them at all?..)
Dmitry Vyukov [Tue, 27 Nov 2012 09:35:44 +0000 (09:35 +0000)]
tsan: fix compilation for dead old compilers (why we are supporting them at all?..)

llvm-svn: 168693

11 years agotsan: add memory range access functions to public iface
Dmitry Vyukov [Tue, 27 Nov 2012 08:41:39 +0000 (08:41 +0000)]
tsan: add memory range access functions to public iface

llvm-svn: 168692

11 years agollvm/test/Transforms/SimplifyLibCalls: FileCheck-ize 3 tests.
NAKAMURA Takumi [Tue, 27 Nov 2012 08:18:23 +0000 (08:18 +0000)]
llvm/test/Transforms/SimplifyLibCalls: FileCheck-ize 3 tests.

llvm-svn: 168691

11 years agollvm/test/Transforms/SimplifyLibCalls/SPrintF.ll: Handle @sprintf() with -instcombine...
NAKAMURA Takumi [Tue, 27 Nov 2012 08:18:15 +0000 (08:18 +0000)]
llvm/test/Transforms/SimplifyLibCalls/SPrintF.ll: Handle @sprintf() with -instcombine, not -simplify-libcalls.

llvm-svn: 168690

11 years agollvm/test/Transforms/SimplifyLibCalls/SPrintF.ll: Fix datalayout since r168516.
NAKAMURA Takumi [Tue, 27 Nov 2012 08:18:08 +0000 (08:18 +0000)]
llvm/test/Transforms/SimplifyLibCalls/SPrintF.ll: Fix datalayout since r168516.

llvm-svn: 168689

11 years agoTrailing linefeeds.
NAKAMURA Takumi [Tue, 27 Nov 2012 08:17:58 +0000 (08:17 +0000)]
Trailing linefeeds.

llvm-svn: 168688

11 years agoRevert accidental commit.
Craig Topper [Tue, 27 Nov 2012 08:17:04 +0000 (08:17 +0000)]
Revert accidental commit.

llvm-svn: 168687

11 years agoMake PrintReg constructor explicit to prevent weird implicit conversions from acciden...
Craig Topper [Tue, 27 Nov 2012 08:14:24 +0000 (08:14 +0000)]
Make PrintReg constructor explicit to prevent weird implicit conversions from accidentally being triggered.

llvm-svn: 168686

11 years agoAdd ENABLE_CXX11 and ENABLE_WERROR to Makefile.llvm.rules for sample project. They...
Craig Topper [Tue, 27 Nov 2012 08:12:24 +0000 (08:12 +0000)]
Add ENABLE_CXX11 and ENABLE_WERROR to Makefile.llvm.rules for sample project. They were previously added to Makefile.llvm.config.in but the consumption was missing

llvm-svn: 168685

11 years agotsan: instrument atomic nand operation
Dmitry Vyukov [Tue, 27 Nov 2012 08:09:25 +0000 (08:09 +0000)]
tsan: instrument atomic nand operation

llvm-svn: 168684

11 years agotsan: add 128-bit atomic operations
Dmitry Vyukov [Tue, 27 Nov 2012 07:41:27 +0000 (07:41 +0000)]
tsan: add 128-bit atomic operations

llvm-svn: 168683

11 years agotsan: refactor atomic operations implementation
Dmitry Vyukov [Tue, 27 Nov 2012 07:25:50 +0000 (07:25 +0000)]
tsan: refactor atomic operations implementation
do the atomic operation under the sync object mutex
make acquire/release sync atomic with the operation itself
combine acquire and release into a single acq_rel operation

llvm-svn: 168682

11 years agoAdd test cases for r168417.
Craig Topper [Tue, 27 Nov 2012 07:19:54 +0000 (07:19 +0000)]
Add test cases for r168417.

llvm-svn: 168681

11 years agoRevert rearrangement of debug info sections to unblock the bots
Eric Christopher [Tue, 27 Nov 2012 06:49:23 +0000 (06:49 +0000)]
Revert rearrangement of debug info sections to unblock the bots
and O0 + debug codegen.

llvm-svn: 168680

11 years agotest/Transforms/SimplifyLibCalls/SPrintF.ll: Suppress this for now. r168677 unveiled...
NAKAMURA Takumi [Tue, 27 Nov 2012 06:42:48 +0000 (06:42 +0000)]
test/Transforms/SimplifyLibCalls/SPrintF.ll: Suppress this for now. r168677 unveiled another failure.

FYI, this test makes no sense with "not grep"... I saw "assertion failure" in stderr.

llvm-svn: 168679

11 years agoModify depends(Src, Dst, PossiblyLoopIndependent).
Preston Briggs [Tue, 27 Nov 2012 06:41:46 +0000 (06:41 +0000)]
Modify depends(Src, Dst, PossiblyLoopIndependent).
If the Src and Dst are the same instruction,
no loop-independent dependence is possible,
so we force the PossiblyLoopIndependent flag to false.

The test case results are updated appropriately.

llvm-svn: 168678

11 years agoinstcombine: Migrate sprintf optimizations
Meador Inge [Tue, 27 Nov 2012 05:57:54 +0000 (05:57 +0000)]
instcombine: Migrate sprintf optimizations

This patch migrates the sprintf optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

llvm-svn: 168677

11 years agoclang/test/lit.cfg: Disable dev-fd-fs on cygwin for now.
NAKAMURA Takumi [Tue, 27 Nov 2012 05:25:41 +0000 (05:25 +0000)]
clang/test/lit.cfg: Disable dev-fd-fs on cygwin for now.

open("/dev/fd/1-foobar") fails with EEXIST on cygwin.

llvm-svn: 168676

11 years agoTest for r168674.
Eli Friedman [Tue, 27 Nov 2012 02:58:49 +0000 (02:58 +0000)]
Test for r168674.

llvm-svn: 168675

11 years agoFix the definition of the vfork() builtin on Haiku. PR14378.
Eli Friedman [Tue, 27 Nov 2012 02:58:24 +0000 (02:58 +0000)]
Fix the definition of the vfork() builtin on Haiku.  PR14378.

llvm-svn: 168674

11 years agoThis patch addresses an incompatibility relative to the 64-bit PowerPC
Bill Schmidt [Tue, 27 Nov 2012 02:46:43 +0000 (02:46 +0000)]
This patch addresses an incompatibility relative to the 64-bit PowerPC
ELF ABI.

Complex values are to be passed in registers as though the real and
imaginary parts were passed as separate parameters.  Prior to this
patch, complex values were passed as byval aggregates.  It turns out
that specifying getDirect() for all complex types when classifying the
argument type results in the desired behavior.

The new Clang test case verifies that the correct LLVM IR is generated
for caller and callee for each of the underlying types for _Complex.

llvm-svn: 168673

11 years agoscan-build: Respect TMPDIR on all platforms, not just Darwin (PR14438).
Jordan Rose [Tue, 27 Nov 2012 02:37:59 +0000 (02:37 +0000)]
scan-build: Respect TMPDIR on all platforms, not just Darwin (PR14438).

llvm-svn: 168672

11 years ago[analyzer] Fix test to work on non-LP64 systems.
Jordan Rose [Tue, 27 Nov 2012 02:37:49 +0000 (02:37 +0000)]
[analyzer] Fix test to work on non-LP64 systems.

Thanks for the original catch in r168303, Takumi.

llvm-svn: 168671

11 years agoRemove unneeded #include.
Jakub Staszak [Tue, 27 Nov 2012 02:00:27 +0000 (02:00 +0000)]
Remove unneeded #include.

llvm-svn: 168670

11 years agoAdd a testcase that r168411 would break.
Rafael Espindola [Tue, 27 Nov 2012 01:56:54 +0000 (01:56 +0000)]
Add a testcase that r168411 would break.

llvm-svn: 168669

11 years ago<rdar://problem/12106825>
Greg Clayton [Tue, 27 Nov 2012 01:52:16 +0000 (01:52 +0000)]
<rdar://problem/12106825>

Allow the expression parser to see more than just data symbols. We now accept any symbol that has an address. We take precautions to only accept symbols by their mangled or demangled names only if the demangled name was not synthesized. If the demangled name is synthesized, then we now mark symbols accordingly and only compare against the mangled original name.

llvm-svn: 168668

11 years agoRevert r168411 for now.
Rafael Espindola [Tue, 27 Nov 2012 01:44:24 +0000 (01:44 +0000)]
Revert r168411 for now.

llvm-svn: 168667

11 years agoThe section is .debug_line.
Eric Christopher [Tue, 27 Nov 2012 01:40:36 +0000 (01:40 +0000)]
The section is .debug_line.

llvm-svn: 168666

11 years agoMake building of llvm-jitlistener conditional on the USE_INTEL_JITEVENTS setting.
Andrew Kaylor [Tue, 27 Nov 2012 01:24:25 +0000 (01:24 +0000)]
Make building of llvm-jitlistener conditional on the USE_INTEL_JITEVENTS setting.

llvm-svn: 168665

11 years agoRemove unneeded #include.
Jakub Staszak [Tue, 27 Nov 2012 01:22:15 +0000 (01:22 +0000)]
Remove unneeded #include.

llvm-svn: 168664

11 years agollvm/CodeGen: Remove empty files in r168659.
NAKAMURA Takumi [Tue, 27 Nov 2012 01:21:50 +0000 (01:21 +0000)]
llvm/CodeGen: Remove empty files in r168659.

llvm-svn: 168663

11 years agoThe skipOnLinux decorator wasn't calling the test method correctly (no need to pass...
Jim Ingham [Tue, 27 Nov 2012 01:21:28 +0000 (01:21 +0000)]
The skipOnLinux decorator wasn't calling the test method correctly (no need to pass in the "self") resulting
in errors on MacOS X for the tests so decorated.

llvm-svn: 168662

11 years agoCode pretification
Joe Abbey [Tue, 27 Nov 2012 01:20:22 +0000 (01:20 +0000)]
Code pretification

llvm-svn: 168661

11 years agoRemove unused forward declaration.
Jakub Staszak [Tue, 27 Nov 2012 01:16:37 +0000 (01:16 +0000)]
Remove unused forward declaration.

llvm-svn: 168660

11 years agoRemove unused MachineLoopRanges analysis.
Jakub Staszak [Tue, 27 Nov 2012 01:14:34 +0000 (01:14 +0000)]
Remove unused MachineLoopRanges analysis.

llvm-svn: 168659

11 years agoExtend test case for r168657.
Chad Rosier [Tue, 27 Nov 2012 01:10:48 +0000 (01:10 +0000)]
Extend test case for r168657.

llvm-svn: 168658

11 years ago[arm fast-isel] Appease the machine verifier by using the proper register
Chad Rosier [Tue, 27 Nov 2012 01:06:49 +0000 (01:06 +0000)]
[arm fast-isel] Appease the machine verifier by using the proper register
classes.  The associated test case still doesn't pass, but it does have far
fewer issues.
rdar://12719844

llvm-svn: 168657

11 years agoFast-math test for SimplifyInstruction: fold multiply by 0
Michael Ilseman [Tue, 27 Nov 2012 01:00:22 +0000 (01:00 +0000)]
Fast-math test for SimplifyInstruction: fold multiply by 0

Applied the patch, rather than committing it.

llvm-svn: 168656

11 years ago<rdar://problem/12636970>
Greg Clayton [Tue, 27 Nov 2012 00:59:26 +0000 (00:59 +0000)]
<rdar://problem/12636970>

Detect the new fixed clang that properly supports bitfields in objc classes.

llvm-svn: 168655

11 years agoRevert r168635 "Step towards implementation of pass manager with doInitialization...
Owen Anderson [Tue, 27 Nov 2012 00:53:24 +0000 (00:53 +0000)]
Revert r168635 "Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model".
It appears to have broken at least one buildbot.

llvm-svn: 168654

11 years agoRemove some Clang-specific ownership roles.
Richard Smith [Tue, 27 Nov 2012 00:48:36 +0000 (00:48 +0000)]
Remove some Clang-specific ownership roles.

llvm-svn: 168653

11 years agoFast-math flags documentation added to LangRef
Michael Ilseman [Tue, 27 Nov 2012 00:48:29 +0000 (00:48 +0000)]
Fast-math flags documentation added to LangRef

llvm-svn: 168652

11 years agollvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll: Loosen expression corresponding...
NAKAMURA Takumi [Tue, 27 Nov 2012 00:48:27 +0000 (00:48 +0000)]
llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll: Loosen expression corresponding to r168627. Win32 and *bsd were affected.

llvm-svn: 168651

11 years agoDuplicate some common owners between Clang and LLVM.
Richard Smith [Tue, 27 Nov 2012 00:48:12 +0000 (00:48 +0000)]
Duplicate some common owners between Clang and LLVM.

llvm-svn: 168650

11 years agoFast-math test for SimplifyInstruction: fold multiply by 0
Michael Ilseman [Tue, 27 Nov 2012 00:47:20 +0000 (00:47 +0000)]
Fast-math test for SimplifyInstruction: fold multiply by 0

llvm-svn: 168649

11 years agoFast-math optimization: fold multiply by zero
Michael Ilseman [Tue, 27 Nov 2012 00:46:26 +0000 (00:46 +0000)]
Fast-math optimization: fold multiply by zero

Added in first optimization using fast-math flags to serve as an example for following optimizations. SimplifyInstruction will now try to optimize an fmul observing its FastMathFlags to see if it can fold multiply by zero when 'nnan' and 'nsz' flags are set.

llvm-svn: 168648

11 years agoFast-math test case for bitcode and textual reading/writing
Michael Ilseman [Tue, 27 Nov 2012 00:45:08 +0000 (00:45 +0000)]
Fast-math test case for bitcode and textual reading/writing

llvm-svn: 168647

11 years agoFast-math flags for the bitcode
Michael Ilseman [Tue, 27 Nov 2012 00:43:38 +0000 (00:43 +0000)]
Fast-math flags for the bitcode

Added in bitcode enum for the serializing of fast-math flags. Added in the reading/writing of fast-math flags from the OptimizationFlags record for BinaryOps.

llvm-svn: 168646

11 years agoFast-math flags for LLVM IR parsing and printing
Michael Ilseman [Tue, 27 Nov 2012 00:42:44 +0000 (00:42 +0000)]
Fast-math flags for LLVM IR parsing and printing

Added in the ability to read LLVM IR text that contains fast-math flags as a sequence of capital letters separated by spaces in any order. Added in the printing of the fast-math flags in a canonical order, and don't print the other flags when 'fast' is specified, as 'fast' implies all the others.

llvm-svn: 168645

11 years agoMake comment names match function names.
Eric Christopher [Tue, 27 Nov 2012 00:41:57 +0000 (00:41 +0000)]
Make comment names match function names.

llvm-svn: 168644

11 years agoAdd in sections for the fission case (no change so incorrect) and
Eric Christopher [Tue, 27 Nov 2012 00:41:54 +0000 (00:41 +0000)]
Add in sections for the fission case (no change so incorrect) and
add a TODO for starting.

llvm-svn: 168643

11 years agoFast-math interfaces for Instructions
Michael Ilseman [Tue, 27 Nov 2012 00:41:22 +0000 (00:41 +0000)]
Fast-math interfaces for Instructions

Add in getter/setter methods for Instructions, allowing them to be the interface to FPMathOperator similarly to now NUS/NSW is handled.

llvm-svn: 168642

11 years agoFast-math flags added to FPMathOperator.
Michael Ilseman [Tue, 27 Nov 2012 00:40:00 +0000 (00:40 +0000)]
Fast-math flags added to FPMathOperator.

Created FastMathFlags convenience struct for the getting and setting of fast-math flags en masse. Added SubclassOptionalData bitfields and corresponding getters/setters to FPMathOperator for the various fast-math flags.

llvm-svn: 168641

11 years agoMove Clang code owners list from llvm/ to cfe/.
Richard Smith [Tue, 27 Nov 2012 00:39:52 +0000 (00:39 +0000)]
Move Clang code owners list from llvm/ to cfe/.

llvm-svn: 168640

11 years agoMove Clang code owners list from llvm/ to cfe/.
Richard Smith [Tue, 27 Nov 2012 00:39:30 +0000 (00:39 +0000)]
Move Clang code owners list from llvm/ to cfe/.

llvm-svn: 168639

11 years agoReorder section output ordering.
Eric Christopher [Tue, 27 Nov 2012 00:13:58 +0000 (00:13 +0000)]
Reorder section output ordering.

llvm-svn: 168638

11 years agoWhitespace cleanup.
Eric Christopher [Tue, 27 Nov 2012 00:13:51 +0000 (00:13 +0000)]
Whitespace cleanup.

llvm-svn: 168637

11 years agoFrontend: Create a virtual file for named pipe inputs.
Daniel Dunbar [Tue, 27 Nov 2012 00:04:16 +0000 (00:04 +0000)]
Frontend: Create a virtual file for named pipe inputs.
 - This ensures we see the right buffer size for the file.

llvm-svn: 168636

11 years agoStep towards implementation of pass manager with doInitialization and doFinalization...
Owen Anderson [Mon, 26 Nov 2012 23:54:47 +0000 (23:54 +0000)]
Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model

Patch by Pedro Artigas, with feedback from by Chandler Carruth.

llvm-svn: 168635

11 years agoThe Function calling thread plan was replacing the stored stop info too soon, causing...
Jim Ingham [Mon, 26 Nov 2012 23:52:18 +0000 (23:52 +0000)]
The Function calling thread plan was replacing the stored stop info too soon, causing recursive entry into the
breakpoint StopInfo's PerformAction, which is bad.  Reworked this so that it is now correct.

<rdar://problem/12501259>

llvm-svn: 168634

11 years agoAdd an assertion to ensure freezeReservedRegs() is only ever called once.
Chad Rosier [Mon, 26 Nov 2012 23:37:07 +0000 (23:37 +0000)]
Add an assertion to ensure freezeReservedRegs() is only ever called once.

llvm-svn: 168633

11 years agoMake this test less sensitive.
Eli Bendersky [Mon, 26 Nov 2012 23:27:09 +0000 (23:27 +0000)]
Make this test less sensitive.

It currently assumes register numbering and any harmless change in the X86
register naming makes it fail. It's enough to match the register names.

llvm-svn: 168632

11 years agoNow that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,
Chad Rosier [Mon, 26 Nov 2012 23:25:41 +0000 (23:25 +0000)]
Now that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,
r168627), we no longer need to call the freezeReservedRegs() function a second
time.  Previously, this pass was conservatively adding the FP to the set of
reserved registers, requiring the second update to the reserved registers.
rdar://12719844

llvm-svn: 168631

11 years agoNow that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,
Chad Rosier [Mon, 26 Nov 2012 23:14:37 +0000 (23:14 +0000)]
Now that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,
r168627), we no longer need to call the freezeReservedRegs() function a second
time.  Previously, this pass was conservatively adding the FP to the set of
reserved registers, requiring the second update to the reserved registers.
rdar://12719844

llvm-svn: 168630

11 years agoGet rid of the getPointeeAlignment helper function from
Eli Friedman [Mon, 26 Nov 2012 23:04:53 +0000 (23:04 +0000)]
Get rid of the getPointeeAlignment helper function from
InstCombineLoadStoreAlloca.cpp, which had many issues.
(At least two bugs were noted on llvm-commits, and it was overly conservative.)
Instead, use getOrEnforceKnownAlignment.

llvm-svn: 168629

11 years agodo not require cloog from configure
Sebastian Pop [Mon, 26 Nov 2012 23:03:41 +0000 (23:03 +0000)]
do not require cloog from configure

llvm-svn: 168628

11 years agoRemove the X86 Maximal Stack Alignment Check pass as it is no longer necessary.
Chad Rosier [Mon, 26 Nov 2012 22:55:05 +0000 (22:55 +0000)]
Remove the X86 Maximal Stack Alignment Check pass as it is no longer necessary.
This pass was conservative in that it always reserved the FP to enable dynamic
stack realignment, which allowed the RA to use aligned spills for vector
registers.  This happens even when spills were not necessary.  The RA has
since been improved to use unaligned spills when necessary.

The new behavior is to realign the stack if the frame pointer was already
reserved for some other reason, but don't reserve the frame pointer just
because a function contains vector virtual registers.

Part of rdar://12719844

llvm-svn: 168627

11 years agoImprove diagnostic on C++11 attribute specifiers that appear at wrong syntactic locat...
Michael Han [Mon, 26 Nov 2012 22:54:45 +0000 (22:54 +0000)]
Improve diagnostic on C++11 attribute specifiers that appear at wrong syntactic locations around class specifiers.

This change list implemented logic that explicitly detects several combinations of locations where C++11 attribute
specifiers might be incorrectly placed within a class specifier. Previously we emit generic diagnostics like
"expected identifier" for such cases; now we emit specific diagnostic against the misplaced attributes, this also
fixed a bug in old code where attributes appear at legitimate locations were incorrectly rejected.

Thanks to Richard Smith for reviewing!

llvm-svn: 168626