Commit Graph

194663 Commits

Author SHA1 Message Date
Eric Christopher 11e4df73c8 getRegForInlineAsmConstraint wants to use TargetRegisterInfo for
a lookup, pass that in rather than use a naked call to getSubtargetImpl.
This involved passing down and around either a TargetMachine or
TargetRegisterInfo. Update all callers/definitions around the targets
and SelectionDAG.

llvm-svn: 230699
2015-02-26 22:38:43 +00:00
Eric Christopher d75c00c638 Add a TargetMachine argument to the AddressingModeMatcher, we'll
need this shortly to get a TargetRegisterInfo from the subtarget
for TargetLowering routines.

llvm-svn: 230698
2015-02-26 22:38:34 +00:00
Nico Weber ff62a6a0b7 Don't crash on leaving nested __finally blocks through an EH edge.
The __finally emission block tries to be clever by removing unused continuation
edges if there's an unconditional jump out of the __finally block. With
exception edges, the EH continuation edge isn't always unused though and we'd
crash in a few places.

Just don't be clever. That makes the IR for __finally blocks a bit longer in
some cases (hence small and behavior-preserving changes to existing tests), but
it makes no difference in general and it fixes the last crash from PR22553.

http://reviews.llvm.org/D7918

llvm-svn: 230697
2015-02-26 22:34:33 +00:00
Chandler Carruth 653773d004 [x86] Fix PR22706 where we would incorrectly try lower a v32i8 dynamic
blend as legal.

We made the same mistake in two different places. Whenever we are custom
lowering a v32i8 blend we need to check whether we are custom lowering
it only for constant conditions that can be shuffled, or whether we
actually have AVX2 and full dynamic blending support on bytes. Both are
fixed, with comments added to make it clear what is going on and a new
test case.

llvm-svn: 230695
2015-02-26 22:15:34 +00:00
Chaoren Lin b6cd5fe918 Fix Bug 20400
Summary:
http://llvm.org/bugs/show_bug.cgi?id=20400

The default triple of i686-pc-linux-gnu for 32 bit linux targets is compatible
but not necessarily identical to the inferior binaries.

Applying Azat Khuzhin's solution of using ArchSpec::IsCompatibleMatch() instead
of ArchSpec::IsExactMatch() when comparing ObjectFile and Modules architecture.

Reviewers: vharron

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D7897

llvm-svn: 230694
2015-02-26 22:15:16 +00:00
Rafael Espindola e8fd00dab0 Simplify arange output.
Move SectionMap to its only user (emitDebugARanges) and
reorder to save a call to sort.

llvm-svn: 230693
2015-02-26 22:02:02 +00:00
Reid Kleckner f3c8209c77 Re-instate the pragma optimize hack for MSVC, but not clang-cl
Reverts commit r230686 with define modifications.

llvm-svn: 230692
2015-02-26 21:34:11 +00:00
Chaoren Lin 3011680752 Add synchronization to TestWatchLocation.
Summary:
There was no guarantee that the three threads haven't already exited by the
time the watchpoint is set.

Reviewers: ovyalov

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D7916

llvm-svn: 230691
2015-02-26 21:31:27 +00:00
Chandler Carruth 7bd840d058 [x86] Restructure the comments and the conditions for handling
dynamic blends.

This makes it much more clear what is going on. The case we're handling
is that of dynamic conditions, and we're bailing when the nature of the
vector types and subtarget preclude lowering the dynamic condition
vselect as an actual blend.

No functionality changed here, but this will make a subsequent bug-fix
to this code much more clear.

llvm-svn: 230690
2015-02-26 21:29:06 +00:00
Chandler Carruth efc6819041 [x86] Re-order the combines of select in the X86 backend. This doesn't
change functionality, but makes it more clear that the dynamic case and
the shuffle case don't overlap in any interesting way.

llvm-svn: 230689
2015-02-26 21:21:36 +00:00
Chandler Carruth 0757f14c69 [x86] Add an assert to catch if we ever try to blend a v32i8 without
AVX2.

llvm-svn: 230688
2015-02-26 21:18:20 +00:00
Reid Kleckner 48e04e492f Give enum an unsigned type to silence -Wmicrosoft clang-cl warning
llvm-svn: 230687
2015-02-26 21:10:01 +00:00
Reid Kleckner 94ce865c81 Remove stale pragma hack for an unsupported MSVC version
llvm-svn: 230686
2015-02-26 21:08:27 +00:00
Reid Kleckner 542a45435f Silence some Win64 clang-cl warnings about unused stuff due to ifdefs
llvm-svn: 230685
2015-02-26 21:08:21 +00:00
Reid Kleckner 1aecd5b8d9 Use wider type for overflow check on LLP64 platforms like Win64, found by clang-cl -Wtautological
llvm-svn: 230684
2015-02-26 21:07:30 +00:00
Alexey Samsonov a716618927 [CMake] Make sure we built one variant of i386/i686 runtime libraries.
llvm-svn: 230683
2015-02-26 21:03:41 +00:00
Nico Weber 6307cf0aa3 Wrap to 80 columns. No behavior change.
llvm-svn: 230682
2015-02-26 20:43:00 +00:00
Reid Kleckner 3c6963b806 Add myself as a code owner for Microsoft C++ ABI code and general Windows support
Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D7891

llvm-svn: 230681
2015-02-26 20:37:49 +00:00
Sanjoy Das 54ad996ca2 IRCE: add a test case for r230619.
llvm-svn: 230680
2015-02-26 20:14:32 +00:00
Simon Atanasyan 82ae48eeb5 [Driver] Use paths explicitly provided by the -L option before default paths
User should be able to override default search paths using the -L
option.

http://reviews.llvm.org/D7902

llvm-svn: 230679
2015-02-26 20:09:50 +00:00
Simon Atanasyan 27967c843b [ELF] Reduce the code indentation
No functional changes.

llvm-svn: 230678
2015-02-26 20:09:42 +00:00
Simon Atanasyan 009c28a231 [Mips] Mark some MipsELFFile member functions as constant
No functional changes.

llvm-svn: 230677
2015-02-26 20:09:37 +00:00
Justin Bogner 43e51634bb InstrProf: Simplify the construction of BinaryCoverageReader
Creating BinaryCoverageReader is a strange and complicated dance where
the constructor sets error codes that member functions will later
read, and the object is in an invalid state if readHeader isn't
immediately called after construction.

Instead, make the constructor private and add a static create method
to do the construction properly. This also has the benefit of removing
readHeader completely and simplifying the interface of the object.

llvm-svn: 230676
2015-02-26 20:06:28 +00:00
Justin Bogner e84891a459 InstrProf: Rename ObjectFileCoverageMappingReader to BinaryCoverageReader
The current name is long and confusing. A shorter one is both easier
to understand and easier to work with.

llvm-svn: 230675
2015-02-26 20:06:24 +00:00
Oleksiy Vyalov b071bee295 Use getProcessTriple inside HostInfoBase::ComputeHostArchitectureSupport instead of getDefaultTargetTriple.
http://reviews.llvm.org/D7893

llvm-svn: 230674
2015-02-26 20:02:13 +00:00
Sanjoy Das 54ef895137 SCEVExpander incorrectly marks generated subtractions as nuw/nsw
It is not sound to mark the increment operation as `nuw` or `nsw`
based on a proof off of the add recurrence if the increment operation
we emit happens to be a `sub` instruction.

I could not come up with a test case for this -- the cases where
SCEVExpander decides to emit a `sub` instruction is quite small, and I
cannot think of a way I'd be able to get SCEV to prove that the
increment does not overflow in those cases.

Differential Revision: http://reviews.llvm.org/D7899

llvm-svn: 230673
2015-02-26 19:51:35 +00:00
Nico Weber fa147e02d8 Try to fix a docs link.
llvm-svn: 230672
2015-02-26 19:48:43 +00:00
Chaoren Lin f591f69fc3 Can't set watchpoints on launching threads on Linux LLGS.
Summary:
They'll be set anyway when the thread starts running, so the launching threads
should just ignore the set request.

Reviewers: ovyalov

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D7914

llvm-svn: 230671
2015-02-26 19:48:15 +00:00
Frederic Riss adbb3f207f [MC] Use the non-EH register mapping in the debug_frame section.
On 32bits x86 Darwin, the register mappings for the eh_frane and
debug_frame sections are different. Thus the same CFI instructions
should result in different registers in the object file. The
problem isn't target specific though, but it requires that the
mappings for EH register numbers be different from the standard
Dwarf one.

The patch looks a bit clumsy. LLVM uses the EH mapping as
canonical for everything frame related. Thus we need to do a
double conversion EH -> LLVM -> Non-EH, when emitting the
debug_frame section.

Fixes PR22363.

Differential Revision: http://reviews.llvm.org/D7593

llvm-svn: 230670
2015-02-26 19:48:07 +00:00
Eric Christopher 83f8824a75 Support bitrig in autoconf build system.
Patch by Dave Huseby.

llvm-svn: 230669
2015-02-26 19:46:32 +00:00
Reid Kleckner 9fde2e013e Win64: Silently ignore __stdcall, __fastcall, and __thiscall
MSVC doesn't warn on this. Users are expected to apply the WINAPI macro
to functions passed by pointer to the Win32 API, and this macro expands
to __stdcall. This means we end up with a lot of useless noisy warnings
about ignored calling conventions when compiling code with clang for
Win64.

llvm-svn: 230668
2015-02-26 19:43:46 +00:00
Reid Kleckner e81017248c Don't sibcall between SysV and Win64 convention functions
The shadow stack space expectations won't match.

Fixes PR22709.

llvm-svn: 230667
2015-02-26 19:43:20 +00:00
Johannes Doerfert ecc33a1f67 Change argument "class" keyword to "const"
llvm-svn: 230666
2015-02-26 19:33:42 +00:00
John Thompson b70ecf6eef Fixed canonical path function.
llvm-svn: 230665
2015-02-26 19:31:10 +00:00
Lang Hames f8ef71c17e [Orc][Kaleidoscope] Fix a missed symbol mangling operation in the fully lazy tutorial.
llvm-svn: 230664
2015-02-26 19:28:37 +00:00
Siva Chandra 9aaab55800 Fix a typo Debugger::ExecuteIOHanders to Debugger::ExecuteIOHandlers.
Test Plan: Build LLDB.

Reviewers: zturner, vharron, clayborg

Reviewed By: vharron, clayborg

Subscribers: jingham, lldb-commits

Differential Revision: http://reviews.llvm.org/D7894

llvm-svn: 230663
2015-02-26 19:26:36 +00:00
Alexey Samsonov 1c915782b9 [UBSan] Run all UBSan tests in 32-bit mode as well.
We build and support UBSan on 32-bit platforms. We should run tests
there as well. Fixes PR22683.

llvm-svn: 230662
2015-02-26 19:19:44 +00:00
Enrico Granata b523deaa38 Fix a bug where LLDB could be convinced to attempt to extract a bitfield of size 0, and consequently crash
llvm-svn: 230661
2015-02-26 19:00:23 +00:00
Hal Finkel 221f467185 [InstCombine/PowerPC] Convert aligned QPX load/store intrinsics into loads/stores
InstCombine has long had logic to convert aligned Altivec load/store intrinsics
into regular loads and stores. This mirrors that functionality for QPX vector
load/store intrinsics.

llvm-svn: 230660
2015-02-26 18:56:03 +00:00
Paul Robinson 093d6e1a70 When the source has a series of assignments, users reasonably want to
have the debugger step through each one individually. Turn off the
combine for adjacent stores at -O0 so we get this behavior.

Possibly, DAGCombine shouldn't run at all at -O0, but that's for
another day; see PR22346.

Differential Revision: http://reviews.llvm.org/D7181

llvm-svn: 230659
2015-02-26 18:47:57 +00:00
Lang Hames f00d772124 [Orc][Kaleidoscope] More diff-reduction between tutorial versions.
llvm-svn: 230658
2015-02-26 18:36:34 +00:00
Petar Jovanovic 90ec1b175e Fix justify error for small structures in varargs for MIPS64BE
There was a problem when passing structures as variable arguments.
The structures smaller than 64 bit were not left justified on MIPS64
big endian. This is now fixed by shifting the value to make it left-
justified when appropriate.

This fixes the bug http://llvm.org/bugs/show_bug.cgi?id=21608

Patch by Aleksandar Beserminji.

Differential Revision: http://reviews.llvm.org/D7881

llvm-svn: 230657
2015-02-26 18:35:15 +00:00
Filipe Cabecinhas a076430ba9 Add -frtti/-fexceptions to some more tests that assume they're on
llvm-svn: 230656
2015-02-26 18:29:41 +00:00
Rafael Espindola 7360fb6206 gold-plugin: "Upgrade" debug info and handle its warnings.
The gold plugin never calls MaterializeModule, so any old debug info
was not deleted and could cause crashes.

Now that it is being "upgraded", the plugin also has to handle warnings
and create Modules with a nice id (it shows in the warning).

llvm-svn: 230655
2015-02-26 18:24:37 +00:00
Ilia K 69b95f49f1 Fix handling of double quotes (MI)
Summary:
* Clean CMICmdArgValString::Validate: now it's based on CMIUtilString::SplitConsiderQuotes method:
A bit of introduction:
# Command line is wrapped into CMICmdArgContext.
# CMICmdArgSet is a set of arguments to be parsed. This class contains CMICmdArgContext as a private member.
# MI command is class which is inhereted from CMICmdBase. It contains CMICmdArgSet as a private member.

When command is executed CMICmdBase::ParseArgs() is called. This method adds args for parsing using CMICmdArgSet::Add(). Then CMICmdBase::ParseValidateCmdOptions() is called, which calls CMICmdArgSet::Validate(). Then it gets a number of arguments (using SplitConsiderQuotes().array_length) and for each arguments registered in ParseArgs() tries to validate it using CMICmdArgValBase::Validate(). Every user commands parses this string again (first time it was made in SplitConsiderQuotes) and in case of CMICmdArgValString it was made incorrectly. It searches the first and last quotes (but it should be first and next after first). Besides, it was splitted into 4 cases. 
I'm just using SplitConsiderQuotes directly, and I don't split them by hand again. 

Actually, I think we should do so in every CMICmdArgVal_XXX::Validate() method.

* Enable MiInterpreterExecTestCase.test_lldbmi_target_create test
* Fix MiExecTestCase.test_lldbmi_exec_arguments_set test

All tests pass on OS X.

Reviewers: abidh, emaste, zturner, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits, zturner, emaste, clayborg, abidh

Differential Revision: http://reviews.llvm.org/D7860

llvm-svn: 230654
2015-02-26 18:21:22 +00:00
Petar Jovanovic d55ae6ba37 Add support for generating MIPS legacy NaN
Currently, the NaN values emitted for MIPS architectures do not cover
non-IEEE754-2008 compliant case. This change fixes the issue.

Patch by Vladimir Radosavljevic.

Differential Revision: http://reviews.llvm.org/D7882

llvm-svn: 230653
2015-02-26 18:19:22 +00:00
Ilia K da86749a92 Fix process's output to stdout/stderr (MI)
Summary:
* Add CMIUtilString::Escape/Unescape methods (MI)
* Fix process's output to stdout/stderr (MI):
lldb-mi escapes process's output to show it in the following format:
```
~"..."
```

But previously not all characters were escaped by CMICmnLLDBDebuggerHandleEvents::ConvertPrintfCtrlCodeToString and output of
```
printf("'\n` - it's \\n\x12\"\\\"")
```
looked like:
```
~"'\r\n` - it's \n"\""
```

This patch fixes it by using CMIUtilString::Escape method and now it looks like:
```
~"'\r\n` - it's \\n\x12\"\\\""
```

Reviewers: abidh, emaste, clayborg

Reviewed By: clayborg

Subscribers: zturner, lldb-commits, emaste, clayborg, abidh

Differential Revision: http://reviews.llvm.org/D7858

llvm-svn: 230652
2015-02-26 18:14:30 +00:00
Sumanth Gundapaneni 28a3b86b06 Use ".arch_extension" ARM directive to support hwdiv on krait
In case of "krait" CPU, asm printer doesn't emit any ".cpu" so the
features bits are not computed. This patch lets the asm printer
emit ".cpu cortex-a9" directive for krait and the hwdiv feature is
enabled through ".arch_extension". In short, krait is treated
as "cortex-a9" with hwdiv. We can not emit ".krait" as CPU since
it is not supported bu GNU GAS yet

llvm-svn: 230651
2015-02-26 18:08:41 +00:00
Sumanth Gundapaneni a9049ea368 Use ".arch_extension" ARM directive to specify the additional CPU features
This patch is in response to r223147 where the avaiable features are
computed based on ".cpu" directive. This will work clean for the standard
variants like cortex-a9. For custom variants which rely on standard cpu names
for assembly, the additional features of a CPU should be propagated. This can be
done via ".arch_extension" as long as the assembler supports it. The
implementation for krait along with unit test will be submitted in next patch.

llvm-svn: 230650
2015-02-26 18:07:35 +00:00
Fariborz Jahanian 947efbc138 Patch to prevent crash when default argument expression
is null due to its previous bad declaration, etc.
rdar://19871240

llvm-svn: 230649
2015-02-26 17:59:54 +00:00