Daniel Jasper [Tue, 22 Dec 2015 15:48:35 +0000 (15:48 +0000)]
clang-format: [JS] Support arrays of object-type literals.
Before:
interface I {
o: {}
[];
}
After:
interface I {
o: {}[];
}
llvm-svn: 256247
Daniel Jasper [Tue, 22 Dec 2015 15:48:15 +0000 (15:48 +0000)]
clang-format: [JS] Conservatively introduce column layout for JS array
initializers. For now, only use it for 20 items or more. Otherwise,
clang-format formats these one-per-line and thus increases the vertical
code size a lot.
llvm-svn: 256246
Daniel Jasper [Tue, 22 Dec 2015 15:47:56 +0000 (15:47 +0000)]
clang-format: [JS] "operator" is not a keyword in Java/JavaScript.
llvm-svn: 256245
Tamas Berghammer [Tue, 22 Dec 2015 15:23:33 +0000 (15:23 +0000)]
Don't pack the structs of the jit debug interface
None of the documentation mentions that the entries are packed structs
and also none of the other implementation I found pack them.
Differential revision: http://reviews.llvm.org/D15715
llvm-svn: 256244
Anastasia Stulova [Tue, 22 Dec 2015 15:14:54 +0000 (15:14 +0000)]
[OpenCL] Fix atomic Builtins check for address spaces of non-atomic pointer
If there are two pointers passed to an atomic Builtin,
Clang doesn't allow the second (non-atomic) one to be qualified
with an address space.
Remove this restriction by recording the address space of passed pointers
in atomics type diagnostics.
llvm-svn: 256243
Chad Rosier [Tue, 22 Dec 2015 15:06:47 +0000 (15:06 +0000)]
Typo. NFC.
llvm-svn: 256242
Logan Chien [Tue, 22 Dec 2015 14:38:30 +0000 (14:38 +0000)]
Fix ARM __cxa_end_cleanup() and gc-sections.
This commit adds SHF_ALLOC and SHF_EXECINSTR section flags to
`.text.__cxa_end_cleanup` section. This fixes a link error when we are
using integrated-as and `ld.gold` (with `-Wl,--gc-sections` and
`-Wl,--fatal-warnings`.)
Detailed Explanation:
1. There might be some problem with LLVM integrated-as. It is not
emitting any section flags for text sections. (This will be fixed in
an independent commit.)
2. `ld.gold` will skip the external symbols in the section without
SHF_ALLOC. This is the reason why `.text.__cxa_end_cleanup_impl`
section is discarded even though it is referenced by
`__cxa_end_cleanup()`.
This commit workaround the problem by specifying the section flags
explicitly.
Fix http://llvm.org/PR21292
llvm-svn: 256241
Daniel Sanders [Tue, 22 Dec 2015 12:59:30 +0000 (12:59 +0000)]
[mips] Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros.
This fixes the 'pure virtual function called' failure with ThreadPool in a
clang-built clang. This fixes the llvm-mips-linux builder.
llvm-svn: 256240
Alexey Bataev [Tue, 22 Dec 2015 12:44:46 +0000 (12:44 +0000)]
[OPENMP] Revert r256238 to fix the problem with tests on Linux.
llvm-svn: 256239
Alexey Bataev [Tue, 22 Dec 2015 12:21:47 +0000 (12:21 +0000)]
[OPENMP 4.5] Parsing/sema for 'depend(sink:vec)' clause in 'ordered' directive.
OpenMP 4.5 adds 'depend(sink:vec)' in 'ordered' directive for doacross loop synchronization. Patch adds parsing and semantic analysis for this clause.
llvm-svn: 256238
Asaf Badouh [Tue, 22 Dec 2015 11:40:04 +0000 (11:40 +0000)]
[X86][AVX512] Add rcp14 and rsqrt14 intrinsics
Differential Revision: http://reviews.llvm.org/D15414
llvm-svn: 256237
Keno Fischer [Tue, 22 Dec 2015 07:14:50 +0000 (07:14 +0000)]
[ASMPrinter] Fix missing handling of DW_OP_bit_piece
In r256077, I added printing for DIExpressions in DEBUG_VALUE comments,
but neglected to handle DW_OP_bit_piece operands. Thanks to
Mikael Holmen and Joerg Sonnenberger for spotting this.
llvm-svn: 256236
Eric Christopher [Tue, 22 Dec 2015 03:12:34 +0000 (03:12 +0000)]
Pull out a bunch of duplicated option handling code into its own
function and use for the targets that can easily support it.
llvm-svn: 256230
Kostya Serebryany [Tue, 22 Dec 2015 01:50:51 +0000 (01:50 +0000)]
[libFuzzer] add AFL-style dictionary for C++, remove the old file with tokens
llvm-svn: 256229
Eric Christopher [Tue, 22 Dec 2015 01:45:45 +0000 (01:45 +0000)]
Use -no-canonical-prefixes to make sure binaries names are easier to match.
llvm-svn: 256228
Tobias Grosser [Tue, 22 Dec 2015 01:41:25 +0000 (01:41 +0000)]
BlockGenerators: Remove unnecessary const_cast
llvm-svn: 256227
David Majnemer [Tue, 22 Dec 2015 01:39:04 +0000 (01:39 +0000)]
[MC] Don't use the architecture to govern which object file format to use
InitMCObjectFileInfo was trying to override the triple in awkward ways.
For example, a triple specifying COFF but not Windows was forced as ELF.
This makes it easy for internal invariants to get violated, such as
those which triggered PR25912.
This fixes PR25912.
llvm-svn: 256226
Kostya Serebryany [Tue, 22 Dec 2015 01:18:49 +0000 (01:18 +0000)]
Partial fix for PR25912, see comment 13. Should fix the sanitizer bootstrap bot
llvm-svn: 256225
Teresa Johnson [Tue, 22 Dec 2015 01:17:19 +0000 (01:17 +0000)]
Handle empty Subprogram list when linking metadata.
Use an iterator that handles an empty subprogram list.
Fixes PR25915.
llvm-svn: 256224
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