Enrico Granata [Tue, 22 Dec 2015 00:47:36 +0000 (00:47 +0000)]
No need for a custom function here; just use what C provides
llvm-svn: 256223
Easwaran Raman [Tue, 22 Dec 2015 00:32:35 +0000 (00:32 +0000)]
Determine callee's hotness and adjust threshold based on that. NFC.
This uses the same criteria used in CFE's CodeGenPGO to identify hot and cold
callees and uses values of inlinehint-threshold and inlinecold-threshold
respectively as the thresholds for such callees.
Differential Revision: http://reviews.llvm.org/D15245
llvm-svn: 256222
Evgeniy Stepanov [Tue, 22 Dec 2015 00:13:11 +0000 (00:13 +0000)]
[safestack] Add option for non-TLS unsafe stack pointer.
This patch adds an option, -safe-stack-no-tls, for using normal
storage instead of thread-local storage for the unsafe stack pointer.
This can be useful when SafeStack is applied to an operating system
kernel.
http://reviews.llvm.org/D15673
Patch by Michael LeMay.
llvm-svn: 256221
Xinliang David Li [Tue, 22 Dec 2015 00:11:15 +0000 (00:11 +0000)]
[PGO] Fix another comdat related issue for COFF
The linker requires that a comdat section must be associated
with a another comdat section that precedes it. This
means the comdat section's name needs to use the profile name
var's name.
Patch tested by Johan Engelen.
llvm-svn: 256220
Enrico Granata [Tue, 22 Dec 2015 00:00:35 +0000 (00:00 +0000)]
Remove an empty folder
llvm-svn: 256219
Vedant Kumar [Mon, 21 Dec 2015 23:41:38 +0000 (23:41 +0000)]
[Support] Timer: Use emplace_back() and range-based loops (NFC)
llvm-svn: 256217
Dan Gohman [Mon, 21 Dec 2015 23:30:41 +0000 (23:30 +0000)]
[WebAssembly] Remove the -target command-line flag from the ld commandline.
This flag isn't needed, or permitted, with the "ld" flavor of lld.
Also, add a basic ld commandline test.
llvm-svn: 256216
Vedant Kumar [Mon, 21 Dec 2015 23:27:44 +0000 (23:27 +0000)]
[Support] Timer: simplify the init() method
llvm-svn: 256215
Dylan McKay [Mon, 21 Dec 2015 23:13:15 +0000 (23:13 +0000)]
[AVR] Added configuration file and machine function information class
This commit adds the 'AVRMachineFunctionInfo' class, which simply stores
basic properties about generated machine functions.
llvm-svn: 256213
Enrico Granata [Mon, 21 Dec 2015 23:10:17 +0000 (23:10 +0000)]
Reduce code duplication
llvm-svn: 256212
Eric Christopher [Mon, 21 Dec 2015 23:04:27 +0000 (23:04 +0000)]
Fix line endings after r256155. NFC.
llvm-svn: 256211
Tobias Grosser [Mon, 21 Dec 2015 23:01:53 +0000 (23:01 +0000)]
ScopInfo: Small improvement to schedule construction [NFC]
We clarify that certain code is only executed if LSchedule is != nullptr.
Previously some of these functions have been executed, but they only passed
a nullptr through. This caused some confusion when reading the code.
llvm-svn: 256209
Tobias Grosser [Mon, 21 Dec 2015 22:45:53 +0000 (22:45 +0000)]
ScopInfo: Polish the implementation of mapToDimension
Besides improving the documentation and the code we now assert in case the input
is invalid (N < 0) and also do not any more return a nullptr in case USet is
empty. This should make the code more readable.
llvm-svn: 256208
Evgeniy Stepanov [Mon, 21 Dec 2015 22:35:03 +0000 (22:35 +0000)]
[asan] Add mincore test.
ASan does not really do anything interesting with mincore, but this
test verifies that the function still works correctly.
llvm-svn: 256207
Xinliang David Li [Mon, 21 Dec 2015 22:26:49 +0000 (22:26 +0000)]
Fix test case comment (NFC)
llvm-svn: 256206
Evgeniy Stepanov [Mon, 21 Dec 2015 22:14:04 +0000 (22:14 +0000)]
[cfi] Fix LowerBitSets on 32-bit targets.
This code attempts to truncate IntPtrTy to i32, which may be the same
type.
llvm-svn: 256205
David Majnemer [Mon, 21 Dec 2015 22:09:34 +0000 (22:09 +0000)]
[clang-cl] Add support for /Brepro
The /Brepro flag controls whether or not the compiler should embed
timestamps into the object file. Object files which do not embed
timestamps are not suitable for incremental linking but are suitable for
hermetic build systems and staged self-hosts of clang.
A normal clang spelling of this flag has been added,
-mincremental-linker-compatible.
llvm-svn: 256204
David Majnemer [Mon, 21 Dec 2015 22:09:27 +0000 (22:09 +0000)]
[MC, COFF] Support link /incremental conditionally
Today, we always take into account the possibility that object files
produced by MC may be consumed by an incremental linker. This results
in us initialing fields which vary with time (TimeDateStamp) which harms
hermetic builds (e.g. verifying a self-host went well) and produces
sub-optimal code because we cannot assume anything about the relative
position of functions within a section (call sites can get redirected
through incremental linker thunks).
Let's provide an MCTargetOption which controls this behavior so that we
can disable this functionality if we know a-priori that the build will
not rely on /incremental.
llvm-svn: 256203
Jun Bum Lim [Mon, 21 Dec 2015 22:00:51 +0000 (22:00 +0000)]
Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst
This is recommit of r256028 with minor fixes in unittests:
CodeGen/Mips/eh.ll
CodeGen/Mips/insn-zero-size-bb.ll
Original commit message:
When identifying blocks post-dominated by an unreachable-terminated block
in BranchProbabilityInfo, consider only the edge to the normal destination
block if the terminator is InvokeInst and let calcInvokeHeuristics() decide
edge weights for the InvokeInst.
llvm-svn: 256202
Xinliang David Li [Mon, 21 Dec 2015 21:52:27 +0000 (21:52 +0000)]
Resubmit r256193 with test fix: assertion failure analyzed
llvm-svn: 256201
Rafael Espindola [Mon, 21 Dec 2015 21:07:31 +0000 (21:07 +0000)]
Drop remaining uses of the Base typedef idiom.
llvm-svn: 256200
Tobias Grosser [Mon, 21 Dec 2015 21:00:43 +0000 (21:00 +0000)]
Add option to assume single-loop scops with sufficient compute are profitable
If a loop has a sufficiently large amount of compute instruction in its loop
body, it is unlikely that our rewrite of the loop iterators introduces large
performance changes. As Polly can also apply beneficical optimizations (such
as parallelization) to such loop nests, we mark them as profitable.
This option is currently "disabled" by default, but can be used to run
experiments. If enabled by setting it e.g. to 40 instructions, we currently
see some compile-time increases on LNT without any significant run-time
changes.
llvm-svn: 256199
Xinliang David Li [Mon, 21 Dec 2015 21:00:33 +0000 (21:00 +0000)]
Revert r256193: build bot failure triggered
llvm-svn: 256198
Rafael Espindola [Mon, 21 Dec 2015 20:59:29 +0000 (20:59 +0000)]
Simplify types. NFC.
llvm-svn: 256197
Rafael Espindola [Mon, 21 Dec 2015 20:50:51 +0000 (20:50 +0000)]
Remove unnecessary cast.
llvm-svn: 256196
Rafael Espindola [Mon, 21 Dec 2015 20:47:33 +0000 (20:47 +0000)]
Remove simple uses of Base::.
They have a tendency to get out of date and obscure where the value/type
is from.
llvm-svn: 256195
Cong Hou [Mon, 21 Dec 2015 20:42:43 +0000 (20:42 +0000)]
[X86][SSE] Transform truncations between vectors of integers into X86ISD::PACKUS/PACKSS operations during DAG combine.
This patch transforms truncation between vectors of integers into
X86ISD::PACKUS/PACKSS operations during DAG combine. We don't do it in
lowering phase because after type legalization, the original truncation
will be turned into a BUILD_VECTOR with each element that is extracted
from a vector and then truncated, and from them it is difficult to do
this optimization. This greatly improves the performance of truncations
on some specific types.
Cost table is updated accordingly.
Differential revision: http://reviews.llvm.org/D14588
llvm-svn: 256194
Xinliang David Li [Mon, 21 Dec 2015 20:41:20 +0000 (20:41 +0000)]
[PGO] Fix profile var comdat generation problem with COFF
When targeting COFF, it is required that a comdat section to
have a global obj with the same name as the comdat (except for
comdats with select kind to be associative). This fix makes
sure that the comdat is keyed on the data variable for COFF.
Also improved test coverage for this.
llvm-svn: 256193
Michael Zolotukhin [Mon, 21 Dec 2015 20:38:18 +0000 (20:38 +0000)]
[ValueTracking] Properly handle non-sized types in isAligned function.
Reviewers: apilipenko, reames, sanjoy, hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15597
llvm-svn: 256192
James Y Knight [Mon, 21 Dec 2015 20:30:49 +0000 (20:30 +0000)]
Tweak myriad-toolchain test.
The test failed when run on a SPARC host, since it was finding the
native gcc installation by accident.
llvm-svn: 256191
Vedant Kumar [Mon, 21 Dec 2015 20:21:15 +0000 (20:21 +0000)]
Reapply "[CodeGen] Fix assignments of inline layouts into the byref structure"
When using blocks, a byref structure is created to represent the
closure. The "byref.layout" field of this structure is an i8*. However,
some 'inline' layouts are represented as i64's, not i8*'s.
Prior to r246985 we cast the i64 'inline' layout to an i8* before
assigning it into the byref structure. This patch brings the cast back
and adds a regression test.
The original version of this patch was too invasive. This version only adds the
cast to BuildByrefLayout.
Differential Revision: http://reviews.llvm.org/D15674
rdar://
23713871
llvm-svn: 256190
Rafael Espindola [Mon, 21 Dec 2015 20:18:04 +0000 (20:18 +0000)]
Remove unnecessary cast.
llvm-svn: 256189
Adrian Prantl [Mon, 21 Dec 2015 20:03:00 +0000 (20:03 +0000)]
Fix PR24563 (LiveDebugVariables unconditionally propagates all DBG_VALUEs)
LiveDebugVariables unconditionally propagates all DBG_VALUE down the
dominator tree, which happens to work fine if there already is another
DBG_VALUE or the DBG_VALUE happends to describe a single-assignment vreg
but is otherwise wrong if the DBG_VALUE is coming from only one of the
predecessors.
In r255759 we introduced a proper data flow analysis scheduled after
LiveDebugVariables that correctly propagates DBG_VALUEs across basic block
boundaries. With the new pass in place, the incorrect propagation in
LiveDebugVariables can be retired witout loosing any of the benefits
where LiveDebugVariables happened to do the right thing.
llvm-svn: 256188
Adrian Prantl [Mon, 21 Dec 2015 19:44:42 +0000 (19:44 +0000)]
Convert the CodeGen/ARM/sched-it-debug-nodes.ll testcase from IR -> MIR.
NFC
PR24563
llvm-svn: 256187
Vedant Kumar [Mon, 21 Dec 2015 19:43:25 +0000 (19:43 +0000)]
Revert "[CodeGen] Fix assignments of inline layouts into the byref structure"
This reverts commit r256185. It breaks CodeGenObjC/fragile-arc.m.
llvm-svn: 256186
Vedant Kumar [Mon, 21 Dec 2015 19:30:37 +0000 (19:30 +0000)]
[CodeGen] Fix assignments of inline layouts into the byref structure
When using blocks, a byref structure is created to represent the
closure. The "byref.layout" field of this structure is an i8*. However,
some 'inline' layouts are represented as i64's, not i8*'s.
Prior to r246985 we cast the i64 'inline' layout to an i8* before
assigning it into the byref structure. This patch brings the cast back
and adds a regression test.
rdar://
23713871
llvm-svn: 256185
Adhemerval Zanella [Mon, 21 Dec 2015 19:27:57 +0000 (19:27 +0000)]
[compiler-rt] [tsan] Add support for PIE build on AArch64
This patch adds PIE executable support for aarch64-linux. It adds
two more segments:
- 0x05500000000-0x05600000000: 39-bits PIE program segments
- 0x2aa00000000-0x2ab00000000: 42-bits PIE program segments
Fortunately it is possible to use the same transformation formula for
the new segments range with some adjustments in shadow to memory
formula (it adds a constant offset based on the VMA size).
A simple testcase is also added, however it is disabled on x86 due the
fact it might fail on newer kernels [1].
[1] https://git.kernel.org/linus/
d1fd836dcf00d2028c700c7e44d2c23404062c90
llvm-svn: 256184
Adrian Prantl [Mon, 21 Dec 2015 19:25:03 +0000 (19:25 +0000)]
Teach ARMLoadStoreOptimizer to ignore DBG_VALUE instructions when merging
instructions.
As noted in PR24563.
rdar://problem/
23963293
llvm-svn: 256183
Kostya Serebryany [Mon, 21 Dec 2015 19:22:26 +0000 (19:22 +0000)]
[asan] fix fopen interceptor to not crash if path is NULL
llvm-svn: 256182
Rafael Espindola [Mon, 21 Dec 2015 19:10:27 +0000 (19:10 +0000)]
Delete dead typedefs.
llvm-svn: 256181
Rafael Espindola [Mon, 21 Dec 2015 19:09:19 +0000 (19:09 +0000)]
Refactor duplicated code. NFC.
llvm-svn: 256180
Kostya Serebryany [Mon, 21 Dec 2015 19:09:01 +0000 (19:09 +0000)]
fix leak in a test, make the sanitizer bot green
llvm-svn: 256179
Tom Stellard [Mon, 21 Dec 2015 18:44:27 +0000 (18:44 +0000)]
AMDGPU/SI: Fix encoding for FLAT_SCRATCH registers on VI
Summary:
These register has different encodings on CI and VI, so we add pseudo
FLAT_SCRACTH registers to be used before MC, and subtarget specific
registers to be used by the MC layer.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D15661
llvm-svn: 256178
Tom Stellard [Mon, 21 Dec 2015 18:44:21 +0000 (18:44 +0000)]
AMDGPU/SI: Change assembly name for flat scratch registers to flat_scratch
This matches what the assembler accepts.
llvm-svn: 256177
Matthew Simpson [Mon, 21 Dec 2015 18:31:25 +0000 (18:31 +0000)]
[AArch64] Add additional extract-extend patterns for smov
This patch adds to the target description two additional patterns for matching
extract-extend operations to SMOV. The patterns catch the v16i8-to-i64 and
v8i16-to-i64 cases. The existing patterns miss these cases because the
extracted elements must first be legalized to i32, resulting in any_extend
nodes.
This was originally implemented as a DAG combine (r255895), but was reverted
due to failing out-of-tree tests.
llvm-svn: 256176
Daniel Jasper [Mon, 21 Dec 2015 18:31:15 +0000 (18:31 +0000)]
clang-format: Properly set the BlockKind for more blocks.
Before:
void f() { struct Dummy { };
f();
}
After:
void f() {
struct Dummy {};
f();
}
llvm-svn: 256175
Teresa Johnson [Mon, 21 Dec 2015 18:24:35 +0000 (18:24 +0000)]
Add testcase for r256161 (PR25907)
llvm-svn: 256174
Chad Rosier [Mon, 21 Dec 2015 18:08:05 +0000 (18:08 +0000)]
Remove extra whitespace. NFC.
llvm-svn: 256173
Simon Atanasyan [Mon, 21 Dec 2015 17:36:40 +0000 (17:36 +0000)]
[ELF][MIPS] Support some of R_MIPS_PCxxx relocations
The patch adds support for R_MIPS_PC16, R_MIPS_PC19_S2, R_MIPS_PC21_S2,
R_MIPS_PC26_S2, R_MIPS_PCHI16, R_MIPS_PCLO16 relocations handling.
llvm-svn: 256172
Teresa Johnson [Mon, 21 Dec 2015 17:33:24 +0000 (17:33 +0000)]
[ThinLTO] Rename variable to reflect bulk importing change (NFC)
llvm-svn: 256171
Daniel Jasper [Mon, 21 Dec 2015 17:28:24 +0000 (17:28 +0000)]
clang-format: Only consider the first #include that looks right to be
the main #include.
llvm-svn: 256170
Dan Gohman [Mon, 21 Dec 2015 17:22:02 +0000 (17:22 +0000)]
[WebAssembly] Convert a regular for loop to a range-based for loop.
llvm-svn: 256169
Dan Gohman [Mon, 21 Dec 2015 17:19:31 +0000 (17:19 +0000)]
[WebAssembly] Clean up comments and fix a missing #include dependency.
llvm-svn: 256168
Dan Gohman [Mon, 21 Dec 2015 17:12:40 +0000 (17:12 +0000)]
[WebAssembly] Remove an unneeded empty destructor.
llvm-svn: 256167
Dan Gohman [Mon, 21 Dec 2015 16:58:49 +0000 (16:58 +0000)]
[WebAssembly] Enclose the operand variables for load and store instructions in braces.
This allows the AsmMatcherEmitter to properly tokenize the AsmStrings for
load and store instructions. This is a step towards asm parsing.
llvm-svn: 256166
Dan Gohman [Mon, 21 Dec 2015 16:53:29 +0000 (16:53 +0000)]
[WebAssembly] Mark the ARGUMENT pseudo-instructions as CodeGenOnly.
llvm-svn: 256165
Dan Gohman [Mon, 21 Dec 2015 16:50:41 +0000 (16:50 +0000)]
[WebAssembly] Add some comments and make some minor source cleanups.
llvm-svn: 256164
Dan Gohman [Mon, 21 Dec 2015 16:47:10 +0000 (16:47 +0000)]
Teach MCOperand::print how to print FPImm operands.
llvm-svn: 256163
Teresa Johnson [Mon, 21 Dec 2015 15:49:59 +0000 (15:49 +0000)]
Remove unused functions from ModuleLinker (NFC)
Remove a couple ModuleLinker methods and a related static function that
are no longer used after the linker split.
llvm-svn: 256162
Teresa Johnson [Mon, 21 Dec 2015 15:38:13 +0000 (15:38 +0000)]
Remove overly strict new assert in BitcodeReader.
This fixes a bug introduced by the ThinLTO metadata linking patch
r255909. The assert is overly-strict and while useful in development of
the patch, doesn't seem interesting to keep.
Fixes PR25907.
llvm-svn: 256161
Jun Bum Lim [Mon, 21 Dec 2015 15:36:49 +0000 (15:36 +0000)]
Revert "[AArch64] Promote loads from stores"
This reverts commit r256004 due to a failure in cortex-a53.
llvm-svn: 256160
Chad Rosier [Mon, 21 Dec 2015 14:49:32 +0000 (14:49 +0000)]
[LIR] Refactor code to enable future patch. NFC.
llvm-svn: 256159
Chad Rosier [Mon, 21 Dec 2015 14:43:45 +0000 (14:43 +0000)]
[AArch64] Enable PostRAScheduler for AArch64 generic build.
Disable post-ra scheduler for perturbed tests to appease the bots and to
preserve the history of the tests.
http://reviews.llvm.org/D15652
llvm-svn: 256158
Igor Breger [Mon, 21 Dec 2015 14:40:36 +0000 (14:40 +0000)]
AVX512BW: Enable AND/OR/XOR vector byte/word paked operation by promoting to qword that natively suppored.
llvm-svn: 256157
Davide Italiano [Mon, 21 Dec 2015 14:10:54 +0000 (14:10 +0000)]
[llvm-objdump] Use appropriate helper. NFC.
llvm-svn: 256156
Amjad Aboud [Mon, 21 Dec 2015 14:07:14 +0000 (14:07 +0000)]
Implemented Support of IA interrupt and exception handlers:
http://lists.llvm.org/pipermail/cfe-dev/2015-September/045171.html
Differential Revision: http://reviews.llvm.org/D15567
llvm-svn: 256155
Daniel Jasper [Mon, 21 Dec 2015 13:52:19 +0000 (13:52 +0000)]
clang-format: [JS] Change Google-style default for aligning operands.
The style guide allows both, but apparently, this is the more dominant use.
llvm-svn: 256154
Daniel Jasper [Mon, 21 Dec 2015 13:40:49 +0000 (13:40 +0000)]
clang-format: Only try to find the "main" include in the first block of
includes.
llvm-svn: 256153
Zlatko Buljan [Mon, 21 Dec 2015 13:08:58 +0000 (13:08 +0000)]
[mips][microMIPS] Implement DERET and DI instructions and check size operand for EXT and DEXT* instructions
Differential Revision: http://reviews.llvm.org/D15570
llvm-svn: 256152
Tobias Grosser [Mon, 21 Dec 2015 12:38:56 +0000 (12:38 +0000)]
Adjust formatting to clang-format changes in 256149
llvm-svn: 256151
Alexander Kornienko [Mon, 21 Dec 2015 12:19:13 +0000 (12:19 +0000)]
[scan-view] replace deprecated optparse with argparse
Summary: scan-view migrated from optparse deprecated Python module to its replacement (argparse) and resolved few conflicts with pep8
Reviewers: ddunbar, aaron.ballman, dcoughlin, jroelofs, zaks.anna
Subscribers: cfe-commits
Patch by Kirill Bobyrev!
Differential Revision: http://reviews.llvm.org/D15370
llvm-svn: 256150
Tobias Grosser [Mon, 21 Dec 2015 12:14:48 +0000 (12:14 +0000)]
ScopDetect: Extract profitability check into subfunction
.. and add some documentation. We also simplify the code by dropping an early
check that is also covered by the the later checks. This might have a small
compile time impact, but as the scops that are skipped are small we should
probably only add this back in the unlikely case that this has a notable
compile-time cost.
No functional change intended.
llvm-svn: 256149
Daniel Jasper [Mon, 21 Dec 2015 12:14:17 +0000 (12:14 +0000)]
clang-format: Extend detection of the "main" #include to use the filename
Before, the first (non-system) header in a file was considered to be
the main include. This is conservative as it makes clang-format change
the #include order less often. Instead implement some basic usage of
the filename itself. With this patch, clang-format considers every
header to be a main include if the header file's basename is a prefix
to the filename the #include is in.
llvm-svn: 256148
Tamas Berghammer [Mon, 21 Dec 2015 12:06:36 +0000 (12:06 +0000)]
Fix emulation of the thumb str instruction
llvm-svn: 256147
James Molloy [Mon, 21 Dec 2015 10:44:36 +0000 (10:44 +0000)]
[Driver] Pass -O* to the gold plugin via -plugin-opt
The gold plugin understands -O0..-O3, but these are not currently being passed to it.
llvm-svn: 256146
George Rimar [Mon, 21 Dec 2015 10:37:33 +0000 (10:37 +0000)]
[ELF] - fixed not properly handled @GOTTPOFF relocation against local symbols
This patch changes sequence of applying relocations, moving tls optimized relocation handling code before code for other locals.
Without that change relocation @GOTTPOFF against local symbol caused runtime error ("unrecognized reloc ...").
That change also should fix other tls optimized relocations, but I did not check them, that's a field for another patch.
R_X86_64_GOTTPOFF relocations against locals can be found when linking against libc.a(malloc.o):
000000000036 000600000016 R_X86_64_GOTTPOFF
0000000000000000 libc_tsd_MALLOC - 4
000000000131 000600000016 R_X86_64_GOTTPOFF
0000000000000000 libc_tsd_MALLOC - 4
Differential revision: http://reviews.llvm.org/D15581
llvm-svn: 256145
George Rimar [Mon, 21 Dec 2015 10:12:06 +0000 (10:12 +0000)]
[ELF] - Implemented R_*_IRELATIVE relocations for x86, x64 targets.
This relocation is similar to R_*_RELATIVE except that the value used in this relocation is the program address returned by the function, which takes no arguments, at the address of
the result of the corresponding R_*_RELATIVE relocation as specified in the processor-specific ABI. The purpose of this relocation to avoid name lookup for locally defined STT_GNU_IFUNC symbols at load-time.
More info can be found in ifunc.txt from https://sites.google.com/site/x32abi/documents.
Differential revision: http://reviews.llvm.org/D15235
llvm-svn: 256144
George Rimar [Mon, 21 Dec 2015 10:00:12 +0000 (10:00 +0000)]
[ELF] - R_386_GOTOFF relocation implemented.
R_386_GOTOFF is calculated as S + A - GOT, where:
S - Represents the value of the symbol whose index resides in the relocation entry.
A - Represents the addend used to compute the value of the relocatable field.
GOT - Represents the address of the global offset table.
Differential revision: http://reviews.llvm.org/D15383
llvm-svn: 256143
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