Gabor Horvath [Mon, 21 Dec 2015 09:43:52 +0000 (09:43 +0000)]
Fix a false positive case in ContainerSizeEmpty check (PR25893).
llvm-svn: 256142
George Rimar [Mon, 21 Dec 2015 09:38:59 +0000 (09:38 +0000)]
[ELF] - Fixed padding for CIE/FDE entries of .eh_frame section
Spec says both CIE/FDE has "Padding
Extra bytes to align the CIE structure to an addressing unit size boundary."
https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/ehframechpt.html
Patch aligns CIE/FDE entries to the size of platform pointer.
Differential revision: http://reviews.llvm.org/D15637
llvm-svn: 256141
Tobias Grosser [Mon, 21 Dec 2015 09:09:44 +0000 (09:09 +0000)]
ScopInfo: Return immediately if scop is unprofitable and marked invalid
As we already log an error when calling invalid, scops unprofitable scops are in
any case marked invalid, but returning immediately safes (a tiny bit of) compile
time and is consistent with our use of 'invalid' in the remainder of the file.
Found by inspection.
llvm-svn: 256140
Tobias Grosser [Mon, 21 Dec 2015 09:09:39 +0000 (09:09 +0000)]
ScopInfo: Return in case we found an invalid array size
Without this return we still log the incorrect array size (and do not detect
this scop), but we would unnecessarily continue to verify that access functions
are affine. As we do not need to do this, we can return right ahead and
consequently safe compile time.
This issue was found by inspection.
llvm-svn: 256139
NAKAMURA Takumi [Mon, 21 Dec 2015 08:46:12 +0000 (08:46 +0000)]
check-llvm: Tweak the feature "timestamps" for autoconf.
Note, ENABLE_TIMESTAMPS is either 1 or 0 in Makefile.config.
llvm-svn: 256138
David Majnemer [Mon, 21 Dec 2015 08:03:07 +0000 (08:03 +0000)]
[MC, COFF] Unbreak support for COFF timestamps
Support for COFF timestamps was unintentionally broken in r246905 when
it was conditionally available depending on whether or not LLVM was
configured with LLVM_ENABLE_TIMESTAMPS. However, Config/config.h was
never included which essentially broke the feature. Due to lax testing,
the breakage was never identified until we observed strange failures
during incremental links of Chromium.
This issue is resolved by simply including Config/config.h in
WinCOFFObjectWriter and teaching lit that the MC/COFF/timestamp.s test
is conditionally supported depending on LLVM_ENABLE_TIMESTAMPS. With
this in place, we can strengthen the test to ensure that it will not
accidentally get broken in the future.
This fixes PR25891.
llvm-svn: 256137
Tobias Grosser [Mon, 21 Dec 2015 07:10:39 +0000 (07:10 +0000)]
ScopInfo: Check for the existance of a single memory accesses
Instead of counting all array memory accesses associated with a load
instruction, we now explicitly check that the single array access that could
(potentially) be associated with a load instruction does not exist. This helps
to document the current behavior of Polly where load instructions can indeed
have at most one associated array access. In the unlikely case this changes
in the future, we add an assert for the case where two load accesses would
prevent us to return a single memory access, but we still should communicate
that not all array memory accesses have been removed.
This addresses post-commit comments from Johannes Doerfert for commit 255776.
llvm-svn: 256136
Craig Topper [Mon, 21 Dec 2015 06:35:56 +0000 (06:35 +0000)]
[Sema] Use range-based for loops. NFC
llvm-svn: 256135
NAKAMURA Takumi [Mon, 21 Dec 2015 02:37:23 +0000 (02:37 +0000)]
[Cygwin] Enable TLS as emutls.
It resolves clang selfhosting with std::once() for Cygwin.
FIXME: It may be EmulatedTLS-generic also for X86-Android.
FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls.
llvm-svn: 256134
NAKAMURA Takumi [Mon, 21 Dec 2015 01:35:28 +0000 (01:35 +0000)]
check-clang-tools requires clang-headers due to test/clang-tidy.
clang-modernize provided clang-headers but it was removed.
llvm-svn: 256133
Manuel Jacob [Mon, 21 Dec 2015 01:26:46 +0000 (01:26 +0000)]
[RS4GC] Add an assert which fails if there is a (yet unsupported) addrspacecast.
The slightly strange indentation comes from clang-format.
llvm-svn: 256132
Craig Topper [Mon, 21 Dec 2015 01:02:28 +0000 (01:02 +0000)]
[InstCombine] Fix indentation. NFC.
llvm-svn: 256131
Dylan McKay [Sun, 20 Dec 2015 23:17:44 +0000 (23:17 +0000)]
[AVR] Added AVRCallingConv.td
llvm-svn: 256130
Xinliang David Li [Sun, 20 Dec 2015 19:55:15 +0000 (19:55 +0000)]
[PGO] testing _WIN64 instead of _WIN32
llvm-svn: 256129
Xinliang David Li [Sun, 20 Dec 2015 19:11:44 +0000 (19:11 +0000)]
[PGO] Implement BOOL_CMPXCHG for Windows
llvm-svn: 256128
Craig Topper [Sun, 20 Dec 2015 18:41:57 +0000 (18:41 +0000)]
[X86] Use range-based for loop. NFC
llvm-svn: 256127
Craig Topper [Sun, 20 Dec 2015 18:41:54 +0000 (18:41 +0000)]
[X86] Prevent constant hoisting for a couple compare immediates that the selection DAG knows how to optimize into a shift.
This allows "icmp ugt %a,
4294967295" and "icmp uge %a,
4294967296" to be optimized into right shifts by 32 which can fold the immediate into the shift instruction. These patterns show up with some regularity in real code.
Unfortunately, since getImmCost can't see the icmp predicate we can't be tell if we're only catching these specific cases.
llvm-svn: 256126
Johannes Doerfert [Sun, 20 Dec 2015 17:12:22 +0000 (17:12 +0000)]
[FIX] Schedule generation for block exiting multiple loops.
This fixes bug PR25604.
llvm-svn: 256125
Michael Kruse [Sun, 20 Dec 2015 14:42:32 +0000 (14:42 +0000)]
Compile fix: Use "&&" operator instead of "and"
llvm-svn: 256124
Tobias Grosser [Sun, 20 Dec 2015 13:31:48 +0000 (13:31 +0000)]
ScopInfo: Bail out in case of complex branch structures
Scops that contain many complex branches are likely to result in complex domain
conditions that consist of a large (> 100) number of conjucts. Transforming
such domains is expensive and unlikely to result in efficient code. To avoid
long compile times we detect this case and skip such scops. In the future we may
improve this by either using non-affine subregions to hide such complex
condition structures or by exploiting in certain cases properties (e.g.,
dominance) that allow us to construct the domains of a scop in a way that
results in a smaller number improving conjuncts.
Example of a code that results in complex iteration spaces:
loop.header
/ | \ \
A0 A2 A4 \
\ / \ / \
A1 A3 \
/ \ / \ |
B0 B2 B4 |
\ / \ / |
B1 B3 ^
/ \ / \ |
C0 C2 C4 |
\ / \ / /
C1 C3 /
\ / /
loop backedge
llvm-svn: 256123
Michael Kuperstein [Sun, 20 Dec 2015 12:37:18 +0000 (12:37 +0000)]
[X86] Add missing m64/int64 conversions
Define the 64-bit equivalents of _m_to_int and _m_from_int.
Differential Revision: http://reviews.llvm.org/D15572
llvm-svn: 256122
Michael Kuperstein [Sun, 20 Dec 2015 12:35:35 +0000 (12:35 +0000)]
[X86] Add signed aliases for popcnt intrinsics
The Intel manual documents both an unsigned form (_mm_popcnt_u32)
and a signed form (_popcnt32) of the intrinsic. Add the missing signed form.
Differential Revision: http://reviews.llvm.org/D15568
llvm-svn: 256121
Dylan McKay [Sun, 20 Dec 2015 12:16:20 +0000 (12:16 +0000)]
Add AVR.td and AVRRegisterInfo.td
Summary:
This adds the core AVR TableGen file, along with the register descriptions.
Lines in AVR.td which require other TableGen files which haven't been committed
yet are commented out.
This is a fairly trivial patch, and should only require a quick review.
I kept the line width smaller than 80 columns, but there are a few exceptions
because I'm not sure how to split a string over several lines.
Reviewers: stoklund
Subscribers: dylanmckay, agnat
Differential Revision: http://reviews.llvm.org/D14684
llvm-svn: 256120
Simon Atanasyan [Sun, 20 Dec 2015 10:57:34 +0000 (10:57 +0000)]
[ELF][MIPS] MIPS .reginfo sections handling
MIPS .reginfo section provides information on the registers used by
the code in the object file. Linker should collect this information and
write .reginfo section in the output file. This section contains a union
of used registers masks taken from input .reginfo sections and final
value of the `_gp` symbol.
For details see the "Register Information" section in Chapter 4 in the
following document:
ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
The patch implements .reginfo sections handling with a couple missed
features: a) it does not put output .reginfo section into the separate
REGINFO segment; b) it does not merge `ri_cprmask` masks from input
section. These features will be implemented later.
Differential Revision: http://reviews.llvm.org/D15669
llvm-svn: 256119
Davide Italiano [Sun, 20 Dec 2015 09:54:34 +0000 (09:54 +0000)]
[llvm-objdump] Move COFF function to where it belongs.
Ideally much more stuff should be moved out of llvm-objdump.cpp, but that
will happen later.
llvm-svn: 256118
Xinliang David Li [Sun, 20 Dec 2015 08:49:31 +0000 (08:49 +0000)]
Fix a bug in test case -- duplicate entries
llvm-svn: 256117
Xinliang David Li [Sun, 20 Dec 2015 08:46:18 +0000 (08:46 +0000)]
Fix a latent UAF bug in profwriter
llvm-svn: 256116
Weiming Zhao [Sun, 20 Dec 2015 06:41:44 +0000 (06:41 +0000)]
Fix mapping of @llvm.arm.ssat/usat intrinsics to ssat/usat instructions for Thumb2
Summary:
r250697 fixed the mapping for ARM mode. We have to do the same for Thumb2 otherwise the same llvm.arm.ssat() will generate different saturating amount for ARM and Thumb.
r250697: http://reviews.llvm.org/rL250697
Reviewers: rmaprath
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D15653
llvm-svn: 256115
Xinliang David Li [Sun, 20 Dec 2015 06:22:13 +0000 (06:22 +0000)]
[PGO] Improve Indexed Profile Reader efficiency
With the support of value profiling added, the Indexed prof
reader gets less efficient. The prof reader initialization
used to be just reading the file header, but with VP support
added, initialization needs to walk through all profile keys
of ondisk hash table resulting in very poor locality and large
memory increase (keys are stored together with the profile data
in the mapped profile buffer). Even worse, when the reader is
used by the compiler (not llvm-profdata too), the penalty becomes
very high as compilation of each single module requires touching
profile data buffer for the whole program.
In this patch, the icall target values (MD5hash) are no longer eargerly
converted back to name strings when the data is read into memory. New
interface is added to to profile reader so that InstrProfSymtab can be
lazily created for Indexed profile reader on-demand. Creating of the
symtab is intended to be used by llvm-profdata tool for symbolic dumping
of VP data. It can be used with compiler (for legacy out of tree uses)
too but not recommended due to compile time and memory reasons
mentioned above.
Some other cleanups are also included: Function Addr to md5 map is now
consolated into InstrProfSymtab. InstrProfStringtab is no longer used and
eliminated.
llvm-svn: 256114
Xinliang David Li [Sun, 20 Dec 2015 05:15:45 +0000 (05:15 +0000)]
Minor clean up -- move large single use method out of header(NFC)
llvm-svn: 256113
NAKAMURA Takumi [Sun, 20 Dec 2015 03:48:23 +0000 (03:48 +0000)]
Revert r219171, "llvm/test/lit.cfg: Suppress dwarf stuff for targeting x86_64-mingw32 while investigating since r219108."
It has been fixed since r219280 by David Majnemer.
llvm-svn: 256112
Mehdi Amini [Sat, 19 Dec 2015 22:56:24 +0000 (22:56 +0000)]
ThreadPool unittests: do not hold mutex when calling condition_variable:notify()
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 256111
Sanjoy Das [Sat, 19 Dec 2015 22:40:28 +0000 (22:40 +0000)]
Nonnull elements in OperandBundleCallSites are not all Instructions
`CloneAndPruneIntoFromInst` sometimes RAUW's dead instructions with
`undef` before erasing them (to avoid deleting instructions that still
have uses). This changes the `WeakVH` in `OperandBundleCallSites` to
hold an `undef`, and we need to guard for this situation in eventuality
in `llvm::InlineFunction`.
llvm-svn: 256110
Sanjoy Das [Sat, 19 Dec 2015 22:40:22 +0000 (22:40 +0000)]
[Deopt bundles] Fix a test case
The `CHECK-NOT` line was incorrect, and would not have caught a
breakage.
llvm-svn: 256109
Davide Italiano [Sat, 19 Dec 2015 22:09:40 +0000 (22:09 +0000)]
[llvm-objdump] Fail early if we can't parse the object header.
llvm-svn: 256108
Rafael Espindola [Sat, 19 Dec 2015 21:42:07 +0000 (21:42 +0000)]
Delete APIs that have been deprecated since 2010.
llvm-svn: 256107
Paul Robinson [Sat, 19 Dec 2015 20:04:03 +0000 (20:04 +0000)]
The PS4 baton passes.
llvm-svn: 256106
Rafael Espindola [Sat, 19 Dec 2015 20:03:23 +0000 (20:03 +0000)]
Assert that we have all use/users in the getters.
An error that is pretty easy to make is to use the lazy bitcode reader
and then do something like
if (V.use_empty())
The problem is that uses in unmaterialized functions are not accounted
for.
This patch adds asserts that all uses are known.
llvm-svn: 256105
Paul Robinson [Sat, 19 Dec 2015 19:41:48 +0000 (19:41 +0000)]
Driver part of debugger tuning.
Adds driver options named -glldb and -gsce to mean -g plus tuning for
lldb and SCE debuggers respectively; the existing -ggdb option does
the same for gdb. Existing options -ggdb0, -ggdb1 etc. unpack into
-ggdb -g<N>. (There will not be -glldb<N> or -gsce<N> options.) The
tuning gets a target-specific default in the driver, and is passed
into cc1 with the new -debugger-tuning option.
As fallout, fixes where '-gsplit-dwarf -g0' would ignore the -g0 part
on Linux.
Differential Revision: http://reviews.llvm.org/D15651
llvm-svn: 256104
Xinliang David Li [Sat, 19 Dec 2015 19:16:32 +0000 (19:16 +0000)]
[PGO] Fix build failure with MSVC
llvm-svn: 256103
JF Bastien [Sat, 19 Dec 2015 18:55:18 +0000 (18:55 +0000)]
WebAssembly: add vtable test
The test will mainly be useful to check that the .s file assembles and relocates properly because vtables reference functions in their data section.
llvm-svn: 256102
Manuel Jacob [Sat, 19 Dec 2015 18:38:42 +0000 (18:38 +0000)]
Remove unnecessary casts. NFC.
llvm-svn: 256101
Manuel Jacob [Sat, 19 Dec 2015 18:26:53 +0000 (18:26 +0000)]
Remove double blanks. NFC.
llvm-svn: 256100
Xinliang David Li [Sat, 19 Dec 2015 18:20:09 +0000 (18:20 +0000)]
Improve InstrProfSymtab test coverage
llvm-svn: 256099
Matt Arsenault [Sat, 19 Dec 2015 17:18:43 +0000 (17:18 +0000)]
SelectionDAG: Cleanup integer bin op promotion functions.
SDIV and UDIV had special handling, but this is the same handling
that min/max need.
llvm-svn: 256098
Vedant Kumar [Sat, 19 Dec 2015 09:54:27 +0000 (09:54 +0000)]
[unittests] ThreadPool: Remove redundant loop, NFC
llvm-svn: 256097
Vedant Kumar [Sat, 19 Dec 2015 09:49:09 +0000 (09:49 +0000)]
[unittests] ThreadPool: Guard updates to MainThreadReady
llvm-svn: 256096
Vedant Kumar [Sat, 19 Dec 2015 08:52:49 +0000 (08:52 +0000)]
Re-reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"
Make personality functions, prefix data, and prologue data hungoff
operands of Function.
This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.
Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!
Includes a fix to scrub value subclass data in dropAllReferences. Does not
use binary literals.
Differential Revision: http://reviews.llvm.org/D13829
llvm-svn: 256095
Vedant Kumar [Sat, 19 Dec 2015 08:48:43 +0000 (08:48 +0000)]
Revert "Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist""
This reverts commit r256093.
This broke lld-x86_64-win7 because of -Werror,-Wc++1y-extensions.
llvm-svn: 256094
Vedant Kumar [Sat, 19 Dec 2015 08:29:51 +0000 (08:29 +0000)]
Reapply "[IR] Move optional data in llvm::Function into a hungoff uselist"
Make personality functions, prefix data, and prologue data hungoff
operands of Function.
This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.
Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!
Includes a fix to scrub value subclass data in dropAllReferences.
Differential Revision: http://reviews.llvm.org/D13829
llvm-svn: 256093
Xinliang David Li [Sat, 19 Dec 2015 07:44:57 +0000 (07:44 +0000)]
[PGO] Add hash to name mapping in InstrProfSymtab
Creator and lookup interfaces are added to this symtab class.
The new interfaces will be used by InstrProf Readers and writer.
A unit test is also added for the new APIs.
llvm-svn: 256092
Vedant Kumar [Sat, 19 Dec 2015 07:30:44 +0000 (07:30 +0000)]
Revert "[IR] Move optional data in llvm::Function into a hungoff uselist"
This reverts commit r256090.
This broke llvm-clang-lld-x86_64-debian-fast.
llvm-svn: 256091
Vedant Kumar [Sat, 19 Dec 2015 07:08:56 +0000 (07:08 +0000)]
[IR] Move optional data in llvm::Function into a hungoff uselist
Make personality functions, prefix data, and prologue data hungoff
operands of Function.
This is based on the email thread "[RFC] Clean up the way we store
optional Function data" on llvm-dev.
Thanks to sanjoyd, majnemer, rnk, loladiro, and dexonsmith for feedback!
Differential Revision: http://reviews.llvm.org/D13829
llvm-svn: 256090
Simon Atanasyan [Sat, 19 Dec 2015 05:51:49 +0000 (05:51 +0000)]
[ELF] Allow target to configure ELF header flags in the output file
The patch configure ELF header flags for MIPS target. For now the flags
are hard coded. In fact they depends on ELF flags of input object files
and selected emulation.
Differential Revision: http://reviews.llvm.org/D15575
llvm-svn: 256089
Chris Bieneman [Sat, 19 Dec 2015 05:47:50 +0000 (05:47 +0000)]
Revert "[CMake] Support a simple case for bootstrap builds to generate PGO data"
This reverts commit r256069, which was an unintentional tag along on
another commit.
llvm-svn: 256088
Mehdi Amini [Sat, 19 Dec 2015 05:12:07 +0000 (05:12 +0000)]
ThreadPool unittest: reimplement concurrency test, deterministically this time.
Follow-up to r256056.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 256087
Kostya Serebryany [Sat, 19 Dec 2015 03:42:16 +0000 (03:42 +0000)]
[libFuzzer] deprecate -save_minimized_corpus, -merge can be used instead
llvm-svn: 256086
Kostya Serebryany [Sat, 19 Dec 2015 03:35:30 +0000 (03:35 +0000)]
[libFuzzer] split the tests to run them in parallel, remove one redundant test
llvm-svn: 256085
Keno Fischer [Sat, 19 Dec 2015 03:32:23 +0000 (03:32 +0000)]
Hopefully fix debug-info-blocks.ll test on win32 bot
llc_dwarf adds an mtriple, which forces this to use COFF, causing
the test to fail. Hopefully using regular llc without the triple
will work fine everywhere
llvm-svn: 256084
Richard Smith [Sat, 19 Dec 2015 03:12:14 +0000 (03:12 +0000)]
Test for diagnostic quality improvement in r256049.
llvm-svn: 256083
Tom Stellard [Sat, 19 Dec 2015 02:54:15 +0000 (02:54 +0000)]
AMDGPU/SI: Fix implemenation of isSourceOfDivergence() for graphics shaders
Summary:
The analysis of shader inputs was completely wrong. We were passing the
wrong index to AttributeSet::hasAttribute() and the logic for which
inputs where in SGPRs was wrong too.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15608
llvm-svn: 256082
Kostya Serebryany [Sat, 19 Dec 2015 02:49:09 +0000 (02:49 +0000)]
[libFuzzer] make CrossOver just one of the other mutations
llvm-svn: 256081
Richard Smith [Sat, 19 Dec 2015 02:40:19 +0000 (02:40 +0000)]
Fix crash-on-invalid if a :: is followed by two or more open parentheses (and then something else).
llvm-svn: 256080
Philip Reames [Sat, 19 Dec 2015 02:38:22 +0000 (02:38 +0000)]
[RS4GC] Remove an overly strong assertion
As shown by the included test case, it's reasonable to end up with constant references during base pointer calculation. The code actually handled this case just fine, we only had the assert to help isolate problems under the belief that constant references shouldn't be present in IR generated by managed frontends. This turned out to be wrong on two fronts: 1) Manual Jacobs is working on a language with constant references, and b) we found a case where the optimizer does create them in practice.
llvm-svn: 256079
Paul Robinson [Sat, 19 Dec 2015 02:24:10 +0000 (02:24 +0000)]
Recommit CC1 part of debugger tuning; pass through setting from driver to LLVM.
Reapplies r256063, except instead of frugally re-using an LLVM enum,
we define a Clang enum, to avoid exposing too much LLVM interface.
Differential Revision: http://reviews.llvm.org/D15650
llvm-svn: 256078
Keno Fischer [Sat, 19 Dec 2015 02:02:44 +0000 (02:02 +0000)]
Clean up the processing of dbg.value in various places
Summary:
First up is instcombine, where in the dbg.declare -> dbg.value conversion,
the llvm.dbg.value needs to be called on the actual loaded value, rather
than the address (since the whole point of this transformation is to be
able to get rid of the alloca). Further, now that that's cleaned up, we
can remove a hack in the backend, that would add an implicit OP_deref if
the argument to dbg.value was an alloca. This stems from before the
existence of DIExpression and is no longer necessary since the deref can
be expressed explicitly.
Now, in order to make sure that the tests pass with this change, we need to
correct the printing of DEBUG_VALUE comments to take into account the
expression, which wasn't taken into account before.
Unfortunately, for both these changes, there were a number of incorrect
test cases (mostly the wrong number of DW_OP_derefs, but also a couple
where the test itself was broken more badly). aprantl and I have gone
through and adjusted these test case in order to make them pass with
these fixes and in some cases to make sure they're actually testing
what they are meant to test.
Reviewers: aprantl
Subscribers: dsanders
Differential Revision: http://reviews.llvm.org/D14186
llvm-svn: 256077
Eric Christopher [Sat, 19 Dec 2015 01:48:43 +0000 (01:48 +0000)]
Use a command line alias to remove the need to rewrite a subtarget
feature for command line compatibility.
llvm-svn: 256076
Matt Arsenault [Sat, 19 Dec 2015 01:46:41 +0000 (01:46 +0000)]
AMDGPU: Switch barrier intrinsics to using convergent
noduplicate prevents unrolling of small loops that happen to have
barriers in them. If a loop has a barrier in it, it is OK to duplicate
it for the unroll.
llvm-svn: 256075
Matt Arsenault [Sat, 19 Dec 2015 01:39:48 +0000 (01:39 +0000)]
Fix broken type legalization of min/max
This was using an anyext when promoting the type
when zext/sext is required.
llvm-svn: 256074
Nicolai Haehnle [Sat, 19 Dec 2015 01:36:26 +0000 (01:36 +0000)]
AMDGPU/SI: use S_MOV_B64 for larger copies in copyPhysReg
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15629
llvm-svn: 256073
Nicolai Haehnle [Sat, 19 Dec 2015 01:16:06 +0000 (01:16 +0000)]
AMDGPU: fix overlapping copies in copyPhysReg
Summary:
When copying aggregate registers within the same register class, there may
be an overlap between source and destination that forces us to do the copy
backwards.
Do the simplest possible thing that guarantees the correct order of moves
when there are overlaps, and does whatever when there is no overlap. (The
last part forces some trivial adjustments to test cases.)
Together with r255906, this fixes a VM fault in Unreal Elemental Demo.
While at it, change the generation of kill and def flags to something that
looks more reasonable. This method is used very late during compilation, so
it probably doesn't matter in practice, and to be honest, I don't know if
this change is actually correct because the semantics in connection with
aggregate registers vs. sub-registers are not clear to me.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93264
Reviewers: arsenm, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15622
llvm-svn: 256072
Kostya Serebryany [Sat, 19 Dec 2015 01:09:49 +0000 (01:09 +0000)]
[libFuzzer] print successfull mutations sequences
llvm-svn: 256071
Chris Bieneman [Sat, 19 Dec 2015 00:56:12 +0000 (00:56 +0000)]
[CMake] Fixing a typo in a flag
Turns out cc1's flag has 1 - not 2...
llvm-svn: 256070
Chris Bieneman [Sat, 19 Dec 2015 00:56:10 +0000 (00:56 +0000)]
[CMake] Support a simple case for bootstrap builds to generate PGO data
Summary:
This patch adds support for the clang multi-stage bootstrapping to support PGO profdata generation, and can build a 2 or 3 stage compiler.
With this patch applied you can configure your build directory with the following invocation of CMake:
cmake -G <generator> -C <path_to_clang>/cmake/caches/PGO.cmake <source dir>
After configuration the following additional targets will be generated:
stage2-instrumented:
Builds a stage1 x86 compiler, runtime, and required tools (llvm-config, llvm-profdata) then uses that compiler to build an instrumented stage2 compiler.
stage2-instrumented-generate-profdata:
Depends on "stage2-instrumented" and will use the instrumented compiler to generate profdata based on the training files in <clang>/utils/perf-training
stage2:
Depends on "stage2-instrumented-generate-profdata" and will use the stage1 compiler with the stage2 profdata to build a PGO-optimized compiler.
stage2-check-llvm:
Depends on stage2 and runs check-llvm using the stage3 compiler.
stage2-check-clang:
Depends on stage2 and runs check-clang using the stage3 compiler.
stage2-check-all:
Depends on stage2 and runs check-all using the stage3 compiler.
stage2-test-suite:
Depends on stage2 and runs the test-suite using the stage3 compiler (requires in-tree test-suite).
Reviewers: bogner, silvas, chandlerc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15584
llvm-svn: 256069
James Y Knight [Sat, 19 Dec 2015 00:53:22 +0000 (00:53 +0000)]
Possibly fix MSVC compilation after r256054.
I don't have any way to test MSVC compilation, but maybe this will fix
the error:
llvm/Support/TrailingObjects.h(286) : error C3210: 'TrailingObjectsBase' : access declaration can only be applied to a base class member
llvm/Support/TrailingObjects.h(337) : see reference to class template instantiation 'llvm::TrailingObjects<BaseTy,TrailingTys...>' being compiled
llvm/Support/TrailingObjects.h(286) : error C2602: 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken' is not a member of a base class of 'llvm::TrailingObjects<BaseTy,TrailingTys...>'
llvm/Support/TrailingObjects.h(91) : see declaration of 'llvm::trailing_objects_internal::TrailingObjectsBase::OverloadToken'
llvm-svn: 256068
Siva Chandra [Sat, 19 Dec 2015 00:52:29 +0000 (00:52 +0000)]
[TestCPPAuto] On linux, we need -fno-limit-debug-info.
Summary: Also xfailed for GCC as there is an problem with debug info generation.
Reviewers: granata.enrico
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D15657
llvm-svn: 256067
Paul Robinson [Sat, 19 Dec 2015 00:23:11 +0000 (00:23 +0000)]
Revert r256063, it's killing clang-tools-extra
llvm-svn: 256066
Rafael Espindola [Fri, 18 Dec 2015 23:46:42 +0000 (23:46 +0000)]
Deprecate a few C APIs.
This deprecates:
* LLVMParseBitcode
* LLVMParseBitcodeInContext
* LLVMGetBitcodeModuleInContext
* LLVMGetBitcodeModule
They are replaced with the functions with a 2 suffix which do not record
a diagnostic.
llvm-svn: 256065
Pete Cooper [Fri, 18 Dec 2015 23:43:17 +0000 (23:43 +0000)]
Regenerated test according to the example assembly at the top. NFC.
The assembly at the top of this file contained more relocations than
the YAML. I regenerated it so that we'd have complete relocation testing.
Also added detailed explanations of the relocations in the file so that
future people don't have to try decode them when something goes wrong.
llvm-svn: 256064
Paul Robinson [Fri, 18 Dec 2015 23:41:11 +0000 (23:41 +0000)]
CC1 part of debugger tuning; pass through setting from driver to LLVM.
Differential Revision: http://reviews.llvm.org/D15650
llvm-svn: 256063
Todd Fiala [Fri, 18 Dec 2015 23:22:15 +0000 (23:22 +0000)]
Xcode: remove --test-subdir test reduction from previous check-in
That was not meant to go in, as it was for testing my last change.
llvm-svn: 256062
Jonathan Peyton [Fri, 18 Dec 2015 23:20:36 +0000 (23:20 +0000)]
Prevent monitor thread creation when KMP_BLOCKTIME="infinite"
When users sets envirable KMP_BLOCKTIME to "infinite" (the time one busy-waits
at barrieres, etc.), the monitor thread is not useful and can be ignored. This
change prevents the creation of the monitor thread when the users sets
KMP_BLOCKTIME to "infinite".
Differential Revision: http://reviews.llvm.org/D15628
llvm-svn: 256061
Jonathan Peyton [Fri, 18 Dec 2015 23:15:35 +0000 (23:15 +0000)]
Remove some extra spaces
llvm-svn: 256060
Todd Fiala [Fri, 18 Dec 2015 23:12:19 +0000 (23:12 +0000)]
Xcode build: pass in vt100 to the Python test runner.
Some of the Green Dragon tests were failing because they didn't
have a TERM set.
llvm-svn: 256059
Xinliang David Li [Fri, 18 Dec 2015 23:06:37 +0000 (23:06 +0000)]
[PGO] Cleanup: Move large member functions out of line (NFC)
llvm-svn: 256058
Chris Bieneman [Fri, 18 Dec 2015 23:00:57 +0000 (23:00 +0000)]
[CMake] PGO training data
Adding in a few more lit substitutions for cc1 and the test exec path.
llvm-svn: 256057
Teresa Johnson [Fri, 18 Dec 2015 22:59:35 +0000 (22:59 +0000)]
Remove possibility of failures to due race in ThreadPool unittest
Remove all checks that required main thread to run faster than tasks in
ThreadPool, and yields which are now unnecessary. This should fix some
bot failures.
llvm-svn: 256056
Zachary Turner [Fri, 18 Dec 2015 22:58:42 +0000 (22:58 +0000)]
Fix invalid enum comparison.
llvm-svn: 256055
James Y Knight [Fri, 18 Dec 2015 22:54:37 +0000 (22:54 +0000)]
Rewrite the TrailingObjects template to provide two new features:
- Automatic alignment of the base type for the alignment requirements
of the trailing types.
- Support for an arbitrary numbers of trailing types, instead of only
1 or 2, by using a variadic template implementation.
Upcoming commits to clang will take advantage of both of these features.
Differential Revision: http://reviews.llvm.org/D12439
llvm-svn: 256054
Enrico Granata [Fri, 18 Dec 2015 22:46:58 +0000 (22:46 +0000)]
__ne__ is the actual Python operator; __neq__ is a typo
llvm-svn: 256053
Rafael Espindola [Fri, 18 Dec 2015 22:44:07 +0000 (22:44 +0000)]
Delete dead code: only functions are materializable.
llvm-svn: 256052
Enrico Granata [Fri, 18 Dec 2015 22:41:25 +0000 (22:41 +0000)]
Add support for seeing through clang::AutoType in ClangASTContext
This allows LLDB to deal correctly with expression result variables declared via the C++11 'auto' keyword
rdar://problem/
23960490
llvm-svn: 256051
Rafael Espindola [Fri, 18 Dec 2015 22:40:27 +0000 (22:40 +0000)]
Use a lambda to reduce code duplication.
llvm-svn: 256050
Richard Smith [Fri, 18 Dec 2015 22:40:25 +0000 (22:40 +0000)]
Split RequireCompleteType into a function that actually requires that the type
is complete (with an error produced if not) and a function that merely queries
whether the type is complete. Either way we'll trigger instantiation if
necessary, but only the former will diagnose and recover from missing module
imports.
The intent of this change is to prevent a class of bugs where code would call
RequireCompleteType(..., 0) and then ignore the result. With modules, we must
check the return value and use it to determine whether the definition of the
type is visible.
This also fixes a debug info quality issue: calls to isCompleteType do not
trigger the emission of debug information for a type in limited-debug-info
mode. This allows us to avoid emitting debug information for type definitions
in more cases where we believe it is safe to do so.
llvm-svn: 256049
Rafael Espindola [Fri, 18 Dec 2015 22:23:16 +0000 (22:23 +0000)]
git-clang-format a region I am about to change.
llvm-svn: 256048
Xinliang David Li [Fri, 18 Dec 2015 22:22:12 +0000 (22:22 +0000)]
[PGO] Simplify computehash interface (NFC)
llvm-svn: 256047
Zachary Turner [Fri, 18 Dec 2015 22:20:15 +0000 (22:20 +0000)]
Support AlwaysBreakAfterReturnType
This changes the behavior of AlwaysBreakAfterDeclarationReturnType
so that it supports breaking after declarations, definitions, or
both.
Differential Revision: http://reviews.llvm.org/D10370
Reviewed By: Daniel Jasper
llvm-svn: 256046
Richard Smith [Fri, 18 Dec 2015 22:19:11 +0000 (22:19 +0000)]
[modules] Don't try to use the definition of a class if
RequireCompleteType(..., 0) says we're not permitted to do so. The definition
might not be visible, even though we know what it is.
llvm-svn: 256045
Todd Fiala [Fri, 18 Dec 2015 22:08:24 +0000 (22:08 +0000)]
remove xcshareddata exclusion from .gitignore; add desktop and lldb-python-testsuite shared schemes used by Xcode buildbot
llvm-svn: 256043
Enrico Granata [Fri, 18 Dec 2015 22:04:47 +0000 (22:04 +0000)]
Turns out, many people define structs named Point that do not share the same names that this formatter uses for fields; use the {} syntax to make it so that a failure to parse the summary doesn't cause the entire printout to fail
llvm-svn: 256042