Davide Italiano [Wed, 29 Apr 2015 20:35:58 +0000 (20:35 +0000)]
[GNU] Remove -x/-X from the list of options to be implemented.
llvm-svn: 236149
Rafael Espindola [Wed, 29 Apr 2015 20:34:31 +0000 (20:34 +0000)]
Write the string table directly to the output file.
There is no need to accumulate it in fragments first.
llvm-svn: 236148
Sanjay Patel [Wed, 29 Apr 2015 20:32:57 +0000 (20:32 +0000)]
too much space; NFC
llvm-svn: 236147
Douglas Katzman [Wed, 29 Apr 2015 20:30:57 +0000 (20:30 +0000)]
[Sparc] Really add sparcel architecture support.
Mostly copy-and-paste from Sparc v8 architecture.
Differential Revision: http://reviews.llvm.org/D8741
llvm-svn: 236146
Rafael Espindola [Wed, 29 Apr 2015 20:25:24 +0000 (20:25 +0000)]
Write the section header string table directly to the output stream.
Instead of accumulating the content in a fragment first, just write it
to the output stream.
Also put it first in the section table, so that we never have to worry
about its index being >= SHN_LORESERVE.
llvm-svn: 236145
Jonathan Roelofs [Wed, 29 Apr 2015 20:06:41 +0000 (20:06 +0000)]
Clean up docs references to './configure' in preparation for deprecating in-source builds
http://reviews.llvm.org/D8787
llvm-svn: 236144
Manman Ren [Wed, 29 Apr 2015 20:03:38 +0000 (20:03 +0000)]
[AArch64] Refactor out codes that depend on specific CS save sequence.
No functionality change.
llvm-svn: 236143
Richard Smith [Wed, 29 Apr 2015 19:26:57 +0000 (19:26 +0000)]
PR23373: A defaulted union copy constructor that is not trivial must still be
emitted as a memcpy.
llvm-svn: 236142
Rafael Espindola [Wed, 29 Apr 2015 19:20:10 +0000 (19:20 +0000)]
Avoid a few const_cast.
llvm-svn: 236141
Tim Northover [Wed, 29 Apr 2015 19:16:38 +0000 (19:16 +0000)]
ARM: mark branch-like instructions with correct flags.
There's probably no way to test BXJ, but if the compiler ever did emit it
during CodeGen it would have to be a block terminator so "isBranch" is
appropriate.
BLX is more tricky. Clearly a call, but it affects surprisingly little.
rdar://
18719544
llvm-svn: 236140
Douglas Katzman [Wed, 29 Apr 2015 19:15:08 +0000 (19:15 +0000)]
New architecture name - 'sparcel' for Sparc little-endian.
Differential Revision: http://reviews.llvm.org/D9263
llvm-svn: 236139
Chaoren Lin [Wed, 29 Apr 2015 19:01:43 +0000 (19:01 +0000)]
lldb-gdbserver should not use unnamed pipes on Windows.
llvm-svn: 236138
Douglas Katzman [Wed, 29 Apr 2015 18:48:29 +0000 (18:48 +0000)]
Make Sparc assembler accept parenthesized constant expressions.
Differential Revision: http://reviews.llvm.org/D9087
llvm-svn: 236137
Chaoren Lin [Wed, 29 Apr 2015 18:25:18 +0000 (18:25 +0000)]
Expose Close{Read/Write}FileDescriptor for pipes.
llvm-svn: 236136
Ahmed Bougacha [Wed, 29 Apr 2015 17:49:05 +0000 (17:49 +0000)]
Re-XFAIL UBSan vptr testcase on darwin.
Partial revert of r235961; the test still fails on Green Dragon bots.
llvm-svn: 236135
Richard Smith [Wed, 29 Apr 2015 17:48:08 +0000 (17:48 +0000)]
Revert r236063 due to regression with -fdelayed-template-parsing.
llvm-svn: 236134
Chaoren Lin [Wed, 29 Apr 2015 17:36:58 +0000 (17:36 +0000)]
Add file descriptor constructor for PipePosix.
llvm-svn: 236133
Chaoren Lin [Wed, 29 Apr 2015 17:24:48 +0000 (17:24 +0000)]
Remove trap code from disassembly.
Summary:
NativeProcessProtocol uses ReadMemory internally for setting/checking
breakpoints but also for generic memory reads (Handle_m), this change adds a
ReadMemoryWithoutTrap for that purpose. Also fixes a bunch of misuses of addr_t
as size/length.
Test Plan: `disassemble` no longer shows the trap code.
Reviewers: jingham, vharron, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D9330
llvm-svn: 236132
Zoran Jovanovic [Wed, 29 Apr 2015 17:23:22 +0000 (17:23 +0000)]
[mips][microMIPSr6] Implement MUL, MUH, MULU and MUHU instructions
Differential Revision: http://reviews.llvm.org/D8894
llvm-svn: 236131
Dmitry Vyukov [Wed, 29 Apr 2015 17:22:43 +0000 (17:22 +0000)]
tsan: add another test for setuid
llvm-svn: 236130
Andrew Kaylor [Wed, 29 Apr 2015 17:21:26 +0000 (17:21 +0000)]
[WinEH] Fix minor bug in begincatch block splitting
llvm-svn: 236129
Reid Kleckner [Wed, 29 Apr 2015 17:17:17 +0000 (17:17 +0000)]
Re-land r236052, the linker errors were fixed by LLVM r236123
Basic __finally blocks don't cause linker errors anymore (although they
are miscompiled).
llvm-svn: 236128
Duncan P. N. Exon Smith [Wed, 29 Apr 2015 17:02:14 +0000 (17:02 +0000)]
Update polly for LLVM rename of debug info metadata with DI* prefix
Ran the same rename-md-di-prefix.sh script attached to PR23080 as in
LLVM r236120 and CFE r236121.
llvm-svn: 236127
Reid Kleckner [Wed, 29 Apr 2015 16:54:11 +0000 (16:54 +0000)]
Disable failing TestDevNull test on Windows
llvm-svn: 236126
Adrian Prantl [Wed, 29 Apr 2015 16:52:31 +0000 (16:52 +0000)]
Debug Info: Represent local anonymous unions as anonymous unions
and as artificial local variables in the debug info.
This is a follow-up to r236059. We can't get rid of the local variables
entirely because the gdb buildbot depends on them, but we can mark them
as artificial while still emitting the correct debug info. As I learned
from review comments other compilers also follow this model.
A paired commit in LLVM temporarily relaxes the debug info verifier to
not check the integrity of DW_OP_bit_pieces of artificial variables.
rdar://problem/
20730771
llvm-svn: 236125
Adrian Prantl [Wed, 29 Apr 2015 16:52:17 +0000 (16:52 +0000)]
Temporarily relax a check in the debug info verifier.
The clang frontend helps out GDB by emitting the members of local anonymous
unions as artificial local variables with shared storage. When SROA splits
the storage for artificial local variables that are smaller than the entire
union, the overhang piece will be outside of the allotted space for the
variable and this check fails.
rdar://problem/
20730771
llvm-svn: 236124
Reid Kleckner [Wed, 29 Apr 2015 16:46:01 +0000 (16:46 +0000)]
[X86] Avoid mangling frameescape labels
x86 Windows uses the '_' prefix for all global symbols, and this was
mistakenly being applied to frameescape labels, which are not externally
visible global symbols. They use the private global prefix 'L'.
The *right* way to fix this is probably to stop masquerading this label
as an ExternalSymbol and create a new SDNode type. These labels are not
"external", and we know they will be resolved by assembly time. Having a
custom SDNode type would allow us to do better X86 address mode
matching, so it's probably worth doing eventually.
llvm-svn: 236123
Andrey Churbanov [Wed, 29 Apr 2015 16:42:24 +0000 (16:42 +0000)]
These are the actual changes in the runtime to issue OMPT-related functions. All of them are surrounded by #if OMPT_SUPPORT and can be disabled (which is the default).
llvm-svn: 236122
Duncan P. N. Exon Smith [Wed, 29 Apr 2015 16:40:08 +0000 (16:40 +0000)]
DebugInfo: Metadata constructs now start with DI*
LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now
that the `DIDescriptor` hierarchy has been gone for about a week. This
commit was generated using the rename-md-di-nodes.sh upgrade script
attached to PR23080, followed by running clang-format-diff.py on the
`lib/` portion of the patch.
llvm-svn: 236121
Duncan P. N. Exon Smith [Wed, 29 Apr 2015 16:38:44 +0000 (16:38 +0000)]
IR: Give 'DI' prefix to debug info metadata
Finish off PR23080 by renaming the debug info IR constructs from `MD*`
to `DI*`. The last of the `DIDescriptor` classes were deleted in
r235356, and the last of the related typedefs removed in r235413, so
this has all baked for about a week.
Note: If you have out-of-tree code (like a frontend), I recommend that
you get everything compiling and tests passing with the *previous*
commit before updating to this one. It'll be easier to keep track of
what code is using the `DIDescriptor` hierarchy and what you've already
updated, and I think you're extremely unlikely to insert bugs. YMMV of
course.
Back to *this* commit: I did this using the rename-md-di-nodes.sh
upgrade script I've attached to PR23080 (both code and testcases) and
filtered through clang-format-diff.py. I edited the tests for
test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns
were off-by-three. It should work on your out-of-tree testcases (and
code, if you've followed the advice in the previous paragraph).
Some of the tests are in badly named files now (e.g.,
test/Assembler/invalid-mdcompositetype-missing-tag.ll should be
'dicompositetype'); I'll come back and move the files in a follow-up
commit.
llvm-svn: 236120
Jan Vesely [Wed, 29 Apr 2015 16:30:46 +0000 (16:30 +0000)]
CodeGen: Default overflow operations to expand so we don't have to assume targets are lying
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: ab
Differential Revision: http://reviews.llvm.org/D9265
llvm-svn: 236119
Zoran Jovanovic [Wed, 29 Apr 2015 16:22:46 +0000 (16:22 +0000)]
[mips][microMIPSr6] Implement SUB and SUBU instructions
Differential Revision: http://reviews.llvm.org/D8764
llvm-svn: 236118
Andrey Churbanov [Wed, 29 Apr 2015 16:22:07 +0000 (16:22 +0000)]
This patch contains the new files for OMPT and the needed changes to the build infrastructure
llvm-svn: 236117
Eric Fiselier [Wed, 29 Apr 2015 15:53:03 +0000 (15:53 +0000)]
Fix syntax error in CMake created when a variable is not defined.
llvm-svn: 236115
Andrey Churbanov [Wed, 29 Apr 2015 15:52:19 +0000 (15:52 +0000)]
This is a preparation patch to get information about the actual release status from nested locks for OMPT.
llvm-svn: 236114
Tom Stellard [Wed, 29 Apr 2015 15:37:06 +0000 (15:37 +0000)]
Allow compilation depending to the LLVM version
It allows to keep temporary compatibilty with older version.
For exemple, this can be use when change are not to large.
Patch by: EdB
llvm-svn: 236113
Zoran Jovanovic [Wed, 29 Apr 2015 15:11:07 +0000 (15:11 +0000)]
[mips][microMIPSr6] Implement ADD, ADDU and ADDIU instructions
Differential Revision: http://reviews.llvm.org/D8704
llvm-svn: 236111
Adrian Prantl [Wed, 29 Apr 2015 15:05:50 +0000 (15:05 +0000)]
Revert "Debug Info: Represent local anonymous unions as anonymous unions"
This reverts commit r236059 as it breaks the gdb buildbot.
llvm-svn: 236110
James Y Knight [Wed, 29 Apr 2015 14:54:44 +0000 (14:54 +0000)]
Sparc: Prefer reg+reg address encoding when only one register used.
Reg+%g0 is preferred to Reg+imm0 by the manual, and is what GCC produces.
Futhermore, reg+imm is invalid for the (not yet supported) "alternate
address space" instructions.
Differential Revision: http://reviews.llvm.org/D8753
llvm-svn: 236107
Rafael Espindola [Wed, 29 Apr 2015 14:53:25 +0000 (14:53 +0000)]
Relax assert to avoid spurious failures with /dev/null.
llvm-svn: 236106
Andrey Churbanov [Wed, 29 Apr 2015 14:36:38 +0000 (14:36 +0000)]
UH OpenMP testsuite update
llvm-svn: 236105
Bradley Smith [Wed, 29 Apr 2015 14:32:06 +0000 (14:32 +0000)]
Revert code changes made under r235976.
This issue was fixed elsewhere in r235396 in a more general way, hence these
changes no longer do anything. Keep the testcase however, to ensure that we
don't regress this for ARM.
llvm-svn: 236104
Vasileios Kalintiris [Wed, 29 Apr 2015 14:17:14 +0000 (14:17 +0000)]
Mips fast-isel - handle functions which return i8 or i6 .
Summary: Allow Mips fast-isel to handle functions which return i8/i16 signed/unsigned.
Test Plan:
Make check tests are forthcoming.
Already passes test-suite at O0/O2 for Mips 32 r1/r2
Reviewers: dsanders, rkotler
Subscribers: llvm-commits, rfuhler
Differential Revision: http://reviews.llvm.org/D6765
llvm-svn: 236103
Rafael Espindola [Wed, 29 Apr 2015 13:55:07 +0000 (13:55 +0000)]
Don't constrain the section order in tests that don't depend on it.
llvm-svn: 236102
Renato Golin [Wed, 29 Apr 2015 13:40:57 +0000 (13:40 +0000)]
Revert 2 tests from "Tests for r236055."
This partially reverts commit r236056, as the two tests were using the same
names and, when executed in parallel, were having intermittent failures.
llvm-svn: 236101
Daniel Jasper [Wed, 29 Apr 2015 13:06:49 +0000 (13:06 +0000)]
clang-format: Add ability to align assignment operators.
In Objective-C some style guides use a style where assignment operators are
aligned, in an effort to increase code readability. This patch adds an option
to the format library which allows this functionality. It is disabled by
default for all the included styles, so it must be explicitly enabled.
The option will change code such as:
- (void)method {
NSNumber *one = @1;
NSNumber *twentyFive = @25;
}
to:
- (void)method {
NSNumber *one = @1;
NSNumber *twentyFive = @25;
}
Patch by Matt Oakes. Thank you!
Accidentally reformatted all the tests...
llvm-svn: 236100
Daniel Sanders [Wed, 29 Apr 2015 12:28:58 +0000 (12:28 +0000)]
[mips] Correct 128-bit shifts on 64-bit targets.
Summary:
The existing code was correct for 32-bit GPR's but not 64-bit GPR's. It now
accounts for both cases.
Reviewers: vkalintiris
Reviewed By: vkalintiris
Subscribers: llvm-commits, mohit.bhakkad, sagar
Differential Revision: http://reviews.llvm.org/D9337
llvm-svn: 236099
Omair Javaid [Wed, 29 Apr 2015 11:52:35 +0000 (11:52 +0000)]
This patch adds support aarch64-linux-gnu (SysV) abi in lldb.
This code is also an import from MacOSx implementation as SysV abi is
similar to what has been implemented for MacOS but may require a few tweaks.
http://reviews.llvm.org/D8538
llvm-svn: 236098
Omair Javaid [Wed, 29 Apr 2015 10:49:45 +0000 (10:49 +0000)]
This patch adds required piece of code for SysV Abi for arm.
Its mostly imported from MacOSx ABI for arm which is similar.
Further tweaking a updates may be required at a later stage.
http://reviews.llvm.org/D8539
llvm-svn: 236097
Toma Tabacu [Wed, 29 Apr 2015 10:19:56 +0000 (10:19 +0000)]
[mips] [IAS] Inline assemble-time shifting out of createLShiftOri. NFC.
Summary:
Do the assemble-time shifts from createLShiftOri at the source, which groups all the shifting together, closer to the main logic path, and
store the results in concisely-named variables to improve code clarity.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8973
llvm-svn: 236096
Aidan Dodds [Wed, 29 Apr 2015 10:08:17 +0000 (10:08 +0000)]
Fix bug in gdb-remote xml parser which failed to parse xml split over multiple rsp packets.
llvm-svn: 236095
Elena Demikhovsky [Wed, 29 Apr 2015 08:49:57 +0000 (08:49 +0000)]
fixed 80-chars; NFC
llvm-svn: 236093
Elena Demikhovsky [Wed, 29 Apr 2015 08:38:53 +0000 (08:38 +0000)]
Fixed masked gather/scatter switch-case
llvm-svn: 236092
Daniel Jasper [Wed, 29 Apr 2015 08:29:26 +0000 (08:29 +0000)]
clang-format: Fix selective indentaiton in nested blocks.
Buggy case:
someFunction(
[] {
// comment
int i; // invoke formatting here.
}, // force line break
aaa);
llvm-svn: 236091
Hafiz Abid Qadeer [Wed, 29 Apr 2015 08:18:41 +0000 (08:18 +0000)]
Add support for -stack-list-variables.
This command is able to list both local variables and stack arguments for a specific thread/frame.
Args are denoted with 'arg="1"'.
Patch from Chuck Ries.
llvm-svn: 236090
Craig Topper [Wed, 29 Apr 2015 07:13:14 +0000 (07:13 +0000)]
[TableGen] Use range-based for loops. NFC.
llvm-svn: 236089
Craig Topper [Wed, 29 Apr 2015 07:13:12 +0000 (07:13 +0000)]
[TableGen] Fold a couple dyn_casts into the ifs that check their results. NFC
llvm-svn: 236088
Craig Topper [Wed, 29 Apr 2015 07:13:05 +0000 (07:13 +0000)]
[TableGen] Replace some dyn_casts followed by an assert with just a regular cast which asserts internally. NFC
llvm-svn: 236087
Elena Demikhovsky [Wed, 29 Apr 2015 06:49:50 +0000 (06:49 +0000)]
fixed comments, blanks, nullptr; NFC
llvm-svn: 236086
Alexey Bataev [Wed, 29 Apr 2015 05:21:03 +0000 (05:21 +0000)]
[OPENMP] Fix crash on reductions codegen for short circuit reduction operations.
llvm-svn: 236084
Craig Topper [Wed, 29 Apr 2015 04:43:36 +0000 (04:43 +0000)]
[TableGen] Use range-based for loops. NFC
llvm-svn: 236083
Nico Weber [Wed, 29 Apr 2015 03:08:32 +0000 (03:08 +0000)]
Revert r236052, it caused linker errors when building 32-bit applications.
llvm-svn: 236082
Hans Wennborg [Wed, 29 Apr 2015 02:36:43 +0000 (02:36 +0000)]
Drop Dragonegg from the release export script
Follow-up to r236077.
llvm-svn: 236081
Filipe Cabecinhas [Wed, 29 Apr 2015 02:36:08 +0000 (02:36 +0000)]
Use an "early return" idiom for the error case. NFC
llvm-svn: 236080
Filipe Cabecinhas [Wed, 29 Apr 2015 02:27:28 +0000 (02:27 +0000)]
Check that we have a valid PointerType element type before calling get()
Same as r236073 but for PointerType.
Bug found with AFL fuzz.
llvm-svn: 236079
Filipe Cabecinhas [Wed, 29 Apr 2015 02:27:21 +0000 (02:27 +0000)]
Use the ArrayType member function for array element types.
ArrayType and StructType accept the same types, so no test.
llvm-svn: 236078
Hans Wennborg [Wed, 29 Apr 2015 02:14:26 +0000 (02:14 +0000)]
Drop Dragonegg support from the release script
It doesn't have a maintainer and none of the release testers test it,
so I don't think it should be part of the release.
http://reviews.llvm.org/D9331
llvm-svn: 236077
Filipe Cabecinhas [Wed, 29 Apr 2015 01:58:31 +0000 (01:58 +0000)]
Turn an assert into report_fatal_error since it's reachable based on user input
Bug found with AFL fuzz.
llvm-svn: 236076
Richard Trieu [Wed, 29 Apr 2015 01:52:17 +0000 (01:52 +0000)]
Add -Wpessimizing-move and -Wredundant-move warnings.
-Wpessimizing-move warns when a call to std::move would prevent copy elision
if the argument was not wrapped in a call. This happens when moving a local
variable in a return statement when the variable is the same type as the
return type or using a move to create a new object from a temporary object.
-Wredundant-move warns when an implicit move would already be made, so the
std::move call is not needed, such as when moving a local variable in a return
that is different from the return type.
Differential Revision: http://reviews.llvm.org/D7633
llvm-svn: 236075
Lang Hames [Wed, 29 Apr 2015 01:33:35 +0000 (01:33 +0000)]
[Orc] It's not valid to pass a null resolver to addModuleSet. Use a no-op
resolver with a diagnostic instread.
llvm-svn: 236074
Filipe Cabecinhas [Wed, 29 Apr 2015 01:27:01 +0000 (01:27 +0000)]
Make sure that isValidElementType(Type) before calling {Array,Struct}Type::get(Type)
Bug found with AFL fuzz.
llvm-svn: 236073
Richard Smith [Wed, 29 Apr 2015 00:07:09 +0000 (00:07 +0000)]
PR20625: Instantiate static constexpr member function of a local struct in a function template earlier.
This is necessary in order to allow the use of a constexpr member function, or
a member function with deduced return type, of a local class within a
surrounding instantiated function template specialization.
Patch by Michael Park!
llvm-svn: 236063
Matthias Braun [Tue, 28 Apr 2015 23:55:11 +0000 (23:55 +0000)]
RegisterCoalescer: hide terminal rule option by default
llvm-svn: 236062
Hans Wennborg [Tue, 28 Apr 2015 23:37:41 +0000 (23:37 +0000)]
test-release.sh: Drop some unused command-line options.
These haven't done anything since before r142165.
llvm-svn: 236061
Eric Christopher [Tue, 28 Apr 2015 23:18:33 +0000 (23:18 +0000)]
Stop emitting the soft-float and soft-float-abi target features
for ARM while the backend will only ignore them. No functional
change intended.
llvm-svn: 236060
Adrian Prantl [Tue, 28 Apr 2015 23:01:24 +0000 (23:01 +0000)]
Debug Info: Represent local anonymous unions as anonymous unions
in the debug info. This patch deletes a hack that emits the members
of local anonymous unions as local variables.
Besides being morally wrong, the existing representation using local
variables breaks internal assumptions about the local variables' storage
size.
Compiling
```
void fn1() {
union {
int i;
char c;
};
i = c;
}
```
with -g -O3 -verify will cause the verifier to fail after SROA splits
the 32-bit storage for the "local variable" c into two pieces because the
second piece is clearly outside the 8-bit range that is expected for a
variable of type char. Given the choice I'd rather fix the debug
representation than weaken the verifier.
Debuggers generally already know how to deal with anonymous unions when
they are members of C++ record types, but they may have problems finding
the local anonymous struct members in the expression evaluator.
rdar://problem/
20730771
llvm-svn: 236059
Rafael Espindola [Tue, 28 Apr 2015 22:59:58 +0000 (22:59 +0000)]
Map directly from signature symbol to group index. NFC.
llvm-svn: 236058
Reid Kleckner [Tue, 28 Apr 2015 22:58:25 +0000 (22:58 +0000)]
Fix Sema tests using __try by adding triple
llvm-svn: 236057
Eric Christopher [Tue, 28 Apr 2015 22:56:57 +0000 (22:56 +0000)]
Tests for r236055.
Patch by Teresa Johnson.
llvm-svn: 236056
Eric Christopher [Tue, 28 Apr 2015 22:54:51 +0000 (22:54 +0000)]
This change is the first of 3 patches to add support for specifying
the profile output from the command line via -fprofile-instr-generate=<path>,
where the specified output path/file will be overridden by the
LLVM_PROFILE_FILE environment variable.
Several changes are made to the runtime to support this:
Add a new interface __llvm_profile_override_default_filename that will
set the profile output filename, but allows LLVM_PROFILE_FILE to override.
This is the interface used by the new option.
Refactor the pid-expansion done for LLVM_PROFILE_FILE into a separate
routine that can be shared by the various filename setting routines
(so that the filename from the option can also use the "%p" syntax).
Move the truncation into setFilename, and only truncate if there is a
new filename specified (to maintain support for appending to the same
profile file in the case of multiple shared objects built with profiling).
Move the handling for a NULL filename passed to __llvm_profile_set_filename and
__llvm_profile_override_default_filename into the new setFilenamePossiblyWithPid
routine. This now correctly resets the output file to default.profraw
instead of NULL.
The handling for a null LLVM_PROFILE_FILE (which should not reset) is done
by caller setFilenameFromEnvironment.
Patch by Teresa Johnson.
llvm-svn: 236055
Eric Christopher [Tue, 28 Apr 2015 22:38:35 +0000 (22:38 +0000)]
Reuse a lookup in an assert.
llvm-svn: 236054
Rafael Espindola [Tue, 28 Apr 2015 22:26:19 +0000 (22:26 +0000)]
Remove redundant temporary std::vector.
New sections are added to the end of the list, so the RelSections array was
redundant.
llvm-svn: 236053
Reid Kleckner [Tue, 28 Apr 2015 22:19:32 +0000 (22:19 +0000)]
[SEH] Add 32-bit lowering code for __try
This is just the clang-side of 32-bit SEH. LLVM still needs work, and it
will determinstically fail to compile until it's feature complete.
On x86, all outlined handlers have no parameters, but they do implicitly
take the EBP value passed in and use it to address locals of the parent
frame. We model this with llvm.frameaddress(1).
This works (mostly), but __finally block inlining can break it. For now,
we apply the 'noinline' attribute. If we really want to inline __finally
blocks on 32-bit x86, we should teach the inliner how to untangle
frameescape and framerecover.
Promote the error diagnostic from codegen to sema. It now rejects SEH on
non-Windows platforms. LLVM doesn't implement SEH on non-x86 Windows
platforms, but there's nothing preventing it.
llvm-svn: 236052
Steven Wu [Tue, 28 Apr 2015 22:07:05 +0000 (22:07 +0000)]
Fix the typo in r236044. NFC.
llvm-svn: 236051
Tim Northover [Tue, 28 Apr 2015 22:03:55 +0000 (22:03 +0000)]
ARM: fix peephole optimisation of TST
We were trying to look through COPY instructions, but only to the next
instruction in a BB and incorrectly anyway. The cases where that would actually
be a good idea are rare enough (and not even tested!) that it's not worth
trying to get right.
rdar://
20721342
llvm-svn: 236050
Rafael Espindola [Tue, 28 Apr 2015 22:03:22 +0000 (22:03 +0000)]
Avoid one more walk over all sections. NFC.
Set the group section index as they are created.
llvm-svn: 236049
Andrew Kaylor [Tue, 28 Apr 2015 22:01:51 +0000 (22:01 +0000)]
Style updates
llvm-svn: 236048
Rafael Espindola [Tue, 28 Apr 2015 21:58:05 +0000 (21:58 +0000)]
Use a range loop. NFC.
llvm-svn: 236047
Andrew Kaylor [Tue, 28 Apr 2015 21:54:14 +0000 (21:54 +0000)]
[WinEH] Split blocks at calls to llvm.eh.begincatch
Differential Revision: http://reviews.llvm.org/D9311
llvm-svn: 236046
Rafael Espindola [Tue, 28 Apr 2015 21:52:33 +0000 (21:52 +0000)]
Avoid an extra walk over the sections just to assign sections to groups.
Assign the sections in the same pass we compute the index.
llvm-svn: 236045
Steven Wu [Tue, 28 Apr 2015 21:49:09 +0000 (21:49 +0000)]
Fix -fno-gnu-inline-asm doesn't catch file scope asm
Summary:
FileScopeAsm should be treated the same as funcion level inline asm.
-fno-gnu-inline-asm should trigger an error if file scope asm is used.
I missed this case from r226340. This should not affect ms-extension
because it is not allowed in the file scope.
Reviewers: bob.wilson, rnk
Reviewed By: rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D9328
llvm-svn: 236044
Richard Smith [Tue, 28 Apr 2015 21:41:14 +0000 (21:41 +0000)]
Fix assertion failure if a lambda array-capture is followed by a this capture.
llvm-svn: 236043
James Y Knight [Tue, 28 Apr 2015 21:27:31 +0000 (21:27 +0000)]
Sparc: Add alternate aliases for conditional branch instructions.
llvm-svn: 236042
Reid Kleckner [Tue, 28 Apr 2015 21:20:42 +0000 (21:20 +0000)]
[SEH] Add an LLVM intrinsic for _exception_info
Eventually, we will lower this out during IR preparation.
llvm-svn: 236036
Sean Callanan [Tue, 28 Apr 2015 21:18:01 +0000 (21:18 +0000)]
Attempt to fix the MSVC build by making ExprIterator
inherit correctly.
llvm-svn: 236035
Richard Smith [Tue, 28 Apr 2015 21:09:27 +0000 (21:09 +0000)]
Work around a suspected MSVC miscompile to try to bring the MSVC2013 buildbot back.
llvm-svn: 236034
Rafael Espindola [Tue, 28 Apr 2015 21:07:28 +0000 (21:07 +0000)]
Remove the GroupMapTy DenseMap. NFC.
Instead use the Group symbol of MCSectionELF.
llvm-svn: 236033
Richard Smith [Tue, 28 Apr 2015 21:05:07 +0000 (21:05 +0000)]
Refactor to make MacroState ownership and lifetime clearer.
llvm-svn: 236032
Sanjay Patel [Tue, 28 Apr 2015 21:03:22 +0000 (21:03 +0000)]
transform fadd chains to increase parallelism
This is a compromise: with this simple patch, we should always handle a chain of exactly 3
operations optimally, but we're not generating the optimal balanced binary tree for a longer
sequence.
In general, this transform will reduce the dependency chain for a sequence of instructions
using N operands from a worst case N-1 dependent operations to N/2 dependent operations.
The optimal balanced binary tree would reduce the chain to log2(N).
The trade-off for not dealing with longer sequences is: (1) we have less complexity in the
compiler, (2) we avoid unknown compile-time blowup calculating a balanced tree, and (3) we
don't need to worry about the increased register pressure required to parallelize longer
sequences. It also seems unlikely that we would ever encounter really long strings of
dependent ops like that in the wild, but I'm not sure how to verify that speculation.
FWIW, I see no perf difference for test-suite running on btver2 (x86-64) with -ffast-math
and this patch.
We can extend this patch to cover other associative operations such as fmul, fmax, fmin,
integer add, integer mul.
This is a partial fix for:
https://llvm.org/bugs/show_bug.cgi?id=17305
and if extended:
https://llvm.org/bugs/show_bug.cgi?id=21768
https://llvm.org/bugs/show_bug.cgi?id=23116
The issue also came up in:
http://reviews.llvm.org/D8941
Differential Revision: http://reviews.llvm.org/D9232
llvm-svn: 236031
Alexei Starovoitov [Tue, 28 Apr 2015 20:38:56 +0000 (20:38 +0000)]
[bpf] fix build
Patch by Brenden Blanco.
llvm-svn: 236030