platform/upstream/llvm.git
8 years agoIRObject: Mark extern_weak as weak.
Rafael Espindola [Mon, 29 Feb 2016 14:26:06 +0000 (14:26 +0000)]
IRObject: Mark extern_weak as weak.

llvm-svn: 262222

8 years agoRemove bogus assert.
Rafael Espindola [Mon, 29 Feb 2016 13:46:39 +0000 (13:46 +0000)]
Remove bogus assert.

llvm-svn: 262219

8 years agoAdd/Improve complex, vector, aggregate types handling for SysV ARM (hard/soft) ABI.
Omair Javaid [Mon, 29 Feb 2016 13:39:20 +0000 (13:39 +0000)]
Add/Improve complex, vector, aggregate types handling for SysV ARM (hard/soft) ABI.

For details see:

Differential revision: http://reviews.llvm.org/D17708

llvm-svn: 262218

8 years agoclang-format: Don't format unrelated nested blocks.
Daniel Jasper [Mon, 29 Feb 2016 12:26:20 +0000 (12:26 +0000)]
clang-format: Don't format unrelated nested blocks.

With this change:

  SomeFunction(
      [] {
int i;
 return i;  // Format this line.
      },
      [] {
 return 2;  // Don't "fix" this.
      });

llvm-svn: 262216

8 years ago[InstSimplify] Restore fsub 0.0, (fsub 0.0, X) ==> X optzn
Benjamin Kramer [Mon, 29 Feb 2016 12:18:25 +0000 (12:18 +0000)]
[InstSimplify] Restore fsub 0.0, (fsub 0.0, X) ==> X optzn

I accidentally removed this in r262212 but there was no test coverage to
detect it.

llvm-svn: 262215

8 years agoFix compiler warnings in the java code
Pavel Labath [Mon, 29 Feb 2016 11:44:15 +0000 (11:44 +0000)]
Fix compiler warnings in the java code

llvm-svn: 262214

8 years ago[mips] Make symbols an acceptable branch target when expanding compare-to-immediate...
Daniel Sanders [Mon, 29 Feb 2016 11:24:49 +0000 (11:24 +0000)]
[mips] Make symbols an acceptable branch target when expanding compare-to-immediate-and-branch macros.

Reviewers: vkalintiris

Subscribers: llvm-commits, vkalintiris, dim, seanbruno, dsanders

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

llvm-svn: 262213

8 years ago[InstSimplify] fsub 0.0, (fsub -0.0, X) ==> X is only safe if signed zeros are ignored.
Benjamin Kramer [Mon, 29 Feb 2016 11:12:23 +0000 (11:12 +0000)]
[InstSimplify] fsub 0.0, (fsub -0.0, X) ==> X is only safe if signed zeros are ignored.

Only allow fsub -0.0, (fsub -0.0, X) ==> X without nsz. PR26746.

llvm-svn: 262212

8 years ago[test-release.sh] Add lldb to list of projects (disabled by default)
Daniel Sanders [Mon, 29 Feb 2016 11:04:39 +0000 (11:04 +0000)]
[test-release.sh] Add lldb to list of projects (disabled by default)

Reviewers: hans

Subscribers: llvm-commits

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

llvm-svn: 262211

8 years ago[asan] Fix UB in test/asan/TestCases/Linux/recvfrom.cc testcase.
Maxim Ostapenko [Mon, 29 Feb 2016 08:56:26 +0000 (08:56 +0000)]
[asan] Fix UB in test/asan/TestCases/Linux/recvfrom.cc testcase.

llvm-svn: 262210

8 years agoUpdate the link of issue
Mohit K. Bhakkad [Mon, 29 Feb 2016 08:22:55 +0000 (08:22 +0000)]
Update the link of issue

llvm-svn: 262209

8 years ago[index] Print and test module import references.
Argyrios Kyrtzidis [Mon, 29 Feb 2016 07:56:07 +0000 (07:56 +0000)]
[index] Print and test module import references.

llvm-svn: 262208

8 years ago[index] Add a caller relation for a call reference.
Argyrios Kyrtzidis [Mon, 29 Feb 2016 07:56:00 +0000 (07:56 +0000)]
[index] Add a caller relation for a call reference.

llvm-svn: 262207

8 years ago[AST/RecursiveASTVisitor] Correction so that dataTraverseStmtPost will get called...
Argyrios Kyrtzidis [Mon, 29 Feb 2016 07:55:55 +0000 (07:55 +0000)]
[AST/RecursiveASTVisitor] Correction so that dataTraverseStmtPost will get called after the statement has been visited.

Fixes the indexing client of this.

llvm-svn: 262206

8 years ago[index] Use ',' to separate symbol roles when printing.
Argyrios Kyrtzidis [Mon, 29 Feb 2016 07:55:51 +0000 (07:55 +0000)]
[index] Use ',' to separate symbol roles when printing.

llvm-svn: 262205

8 years ago[asan] Re-enable test/asan/TestCases/Linux/recvfrom.cc testcase.
Maxim Ostapenko [Mon, 29 Feb 2016 07:47:35 +0000 (07:47 +0000)]
[asan] Re-enable test/asan/TestCases/Linux/recvfrom.cc testcase.

This testcase failed on sanitizer-x86_64-linux buildbot in large parallel build due to race on
port 1234 between AddressSanitizer-i386-linux and AddressSanitizer-x86_64-linux instances of recvfrom.cc.
This patch tries to resolve the issue by relying on kernel to choose available port instead of hardcoding
its number in testcase.

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

llvm-svn: 262204

8 years agoScopInfo: Remove indentation in hoistInvariantLoads
Tobias Grosser [Mon, 29 Feb 2016 07:29:42 +0000 (07:29 +0000)]
ScopInfo: Remove indentation in hoistInvariantLoads

We move verifyInvariantLoads out of this function to allow for an early return
without the need for code duplication. A similar transformation was suggested
by Johannes Doerfert in post commit review of r262033.

llvm-svn: 262203

8 years agoRevert "Add update_test.py script."
Tobias Grosser [Mon, 29 Feb 2016 07:12:10 +0000 (07:12 +0000)]
Revert "Add update_test.py script."

This reverts commit r261899. Even though I am not yet 100% certain, this is
commit is the only one that has some relation to the recent cmake failures
in Polly.

llvm-svn: 262202

8 years ago[X86] Disabling avx512f should also disable avx512vbmi and avx512ifma. Enabling avx51...
Craig Topper [Mon, 29 Feb 2016 06:51:38 +0000 (06:51 +0000)]
[X86] Disabling avx512f should also disable avx512vbmi and avx512ifma. Enabling avx512vbmi or avx512ifma should enable avx512f. Add command line switches and header defines for avx512ifma and avx512vbmi.

llvm-svn: 262201

8 years ago[X86] Enabling xsave should not enable AVX. I seem to have done this, but I don't...
Craig Topper [Mon, 29 Feb 2016 06:51:34 +0000 (06:51 +0000)]
[X86] Enabling xsave should not enable AVX. I seem to have done this, but I don't know why.

llvm-svn: 262200

8 years ago[OPENMP 4.5] Initial support for data members in 'reduction' clauses.
Alexey Bataev [Mon, 29 Feb 2016 05:54:20 +0000 (05:54 +0000)]
[OPENMP 4.5] Initial support for data members in 'reduction' clauses.

OpenMP 4.5 allows to privatize non-static data members of current class
in non-static member functions. Patch adds initial parsing/semantic
analysis for data members support in 'reduction' clauses.

llvm-svn: 262199

8 years ago[clang-cl] /EHc should not effect functions with explicit exception specifications
David Majnemer [Mon, 29 Feb 2016 01:40:36 +0000 (01:40 +0000)]
[clang-cl] /EHc should not effect functions with explicit exception specifications

Functions with an explicit exception specification have their behavior
dictated by the specification.  The additional /EHc behavior only comes
into play if no exception specification is given.

llvm-svn: 262198

8 years ago[clang-cl] /EHc should not have an effect on /EHa
David Majnemer [Mon, 29 Feb 2016 01:40:30 +0000 (01:40 +0000)]
[clang-cl] /EHc should not have an effect on /EHa

This matches behavior with MSVC.

llvm-svn: 262197

8 years ago[PM] Wire up optimization levels and default pipeline construction APIs
Chandler Carruth [Sun, 28 Feb 2016 22:16:03 +0000 (22:16 +0000)]
[PM] Wire up optimization levels and default pipeline construction APIs
in the PassBuilder.

These are really just stubs for now, but they give a nice API surface
that Clang or other tools can start learning about and enabling for
experimentation.

I've also wired up parsing various synthetic module pass names to
generate these set pipelines. This allows the pipelines to be combined
with other passes and have their order controlled, with clear separation
between the *kind* of canned pipeline, and the *level* of optimization
to be used within that canned pipeline.

The most interesting part of this patch is almost certainly the spec for
the different optimization levels. I don't think we can ever have hard
and fast rules that would make it easy to determine whether a particular
optimization makes sense at a particular level -- it will always be in
large part a judgement call. But hopefully this will outline the
expected rationale that should be used, and the direction that the
pipelines should be taken. Much of this was based on a long llvm-dev
discussion I started years ago to try and crystalize the intent behind
these pipelines, and now, at long long last I'm returning to the task of
actually writing it down somewhere that we can cite and try to be
consistent with.

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

llvm-svn: 262196

8 years agoRemove dead code for ELF.
Rui Ueyama [Sun, 28 Feb 2016 21:59:02 +0000 (21:59 +0000)]
Remove dead code for ELF.

llvm-svn: 262195

8 years agoRemove dead code for ELF.
Rui Ueyama [Sun, 28 Feb 2016 21:22:44 +0000 (21:22 +0000)]
Remove dead code for ELF.

The preload feature was buggy that we had disabled it even for ELF.

llvm-svn: 262194

8 years agoRemove remaining code for COFF.
Rui Ueyama [Sun, 28 Feb 2016 21:22:40 +0000 (21:22 +0000)]
Remove remaining code for COFF.

llvm-svn: 262193

8 years agoRemove DriverTest.h.
Rui Ueyama [Sun, 28 Feb 2016 20:56:34 +0000 (20:56 +0000)]
Remove DriverTest.h.

Because the class is used only by one instance, we do not have to
use template there in DriverTest.h. Everything can be moved to
DarwinLdDriverTest.cpp.

llvm-svn: 262192

8 years agoMake the entry point function calls consistent. NFC.
Rui Ueyama [Sun, 28 Feb 2016 19:54:51 +0000 (19:54 +0000)]
Make the entry point function calls consistent. NFC.

llvm-svn: 262191

8 years agoMove functionality of UniversalDriver to the entry point file.
Rui Ueyama [Sun, 28 Feb 2016 19:50:14 +0000 (19:50 +0000)]
Move functionality of UniversalDriver to the entry point file.

UniversalDriver was used as a dispatcher to each platform-specific driver.
It had its own Options.td file. It was not just too much to parse only a
few options (we only want to parse -core, -flavor or argv[0]),
but also interpreted arguments too early. For example, if you invoke lld as
"lld -flavor gnu ... -help", then you'd get the UniversalDriver's help
message instead of GnuDriver's. This patch eliminates the use of Options
from the dispatcher.

http://reviews.llvm.org/D17686

llvm-svn: 262190

8 years ago[modules] Prefer more complete array types.
Vassil Vassilev [Sun, 28 Feb 2016 19:08:24 +0000 (19:08 +0000)]
[modules] Prefer more complete array types.

If we import a module that has a complete array type and one that has an
incomplete array type, the declaration found by name lookup might be the one with
the incomplete type, possibly resulting in rejects-valid.

Now, the name lookup prefers decls with a complete array types. Also,
diagnose cases when the redecl chain has array bound, different from the merge
candidate.

Reviewed by Richard Smith.

llvm-svn: 262189

8 years ago[PM] Appease mingw32's auto-import DLL build with minimal tweaks, with fix for clang.
NAKAMURA Takumi [Sun, 28 Feb 2016 17:17:00 +0000 (17:17 +0000)]
[PM] Appease mingw32's auto-import DLL build with minimal tweaks, with fix for clang.

char AnalysisBase::ID should be declared as extern and defined in one module.

llvm-svn: 262188

8 years ago[mips] Remove unused function declarations from MipsRegisterInfo.h. NFC.
Vasileios Kalintiris [Sun, 28 Feb 2016 16:55:28 +0000 (16:55 +0000)]
[mips] Remove unused function declarations from MipsRegisterInfo.h. NFC.

llvm-svn: 262187

8 years agoRevert r262185, "[PM] Appease mingw32's auto-import DLL build with minimal tweaks."
NAKAMURA Takumi [Sun, 28 Feb 2016 16:54:06 +0000 (16:54 +0000)]
Revert r262185, "[PM] Appease mingw32's auto-import DLL build with minimal tweaks."

I'll rework soon.

llvm-svn: 262186

8 years ago[PM] Appease mingw32's auto-import DLL build with minimal tweaks.
NAKAMURA Takumi [Sun, 28 Feb 2016 16:38:46 +0000 (16:38 +0000)]
[PM] Appease mingw32's auto-import DLL build with minimal tweaks.

char AnalysisBase::ID should be declared as extern and defined in one module.

llvm-svn: 262185

8 years agoDelete more COFF and ELF bits from the old linker.
Rafael Espindola [Sun, 28 Feb 2016 16:27:08 +0000 (16:27 +0000)]
Delete more COFF and ELF bits from the old linker.

llvm-svn: 262184

8 years agoDelete dead arch types.
Rafael Espindola [Sun, 28 Feb 2016 16:11:53 +0000 (16:11 +0000)]
Delete dead arch types.

llvm-svn: 262183

8 years agoDelete a bit more ELF and COFF from the old linker.
Rafael Espindola [Sun, 28 Feb 2016 16:08:21 +0000 (16:08 +0000)]
Delete a bit more ELF and COFF from the old linker.

llvm-svn: 262182

8 years agoDelete more ELF bits from the old linker.
Rafael Espindola [Sun, 28 Feb 2016 16:03:37 +0000 (16:03 +0000)]
Delete more ELF bits from the old linker.

llvm-svn: 262181

8 years agoWebAssembly: fix test
JF Bastien [Sun, 28 Feb 2016 15:44:54 +0000 (15:44 +0000)]
WebAssembly: fix test

Operand order seems to have changed, the new one is nicer.

llvm-svn: 262180

8 years agoWebAssembly: fix build
JF Bastien [Sun, 28 Feb 2016 15:33:53 +0000 (15:33 +0000)]
WebAssembly: fix build

More API churn, experimental target got sad.

llvm-svn: 262179

8 years agoAdd ARM EHABI-related constants to unwind.h.
Logan Chien [Sun, 28 Feb 2016 15:01:42 +0000 (15:01 +0000)]
Add ARM EHABI-related constants to unwind.h.

Adds a number of constants, defined in the ARM EHABI spec, to the Clang
lib/Headers/unwind.h header. This is prerequisite for landing
http://reviews.llvm.org/D15781, as previously discussed there.

Patch by Timon Van Overveldt.

llvm-svn: 262178

8 years ago[CLANG] [AVX512] [BUILTIN] Adding PSLL{V|W|Wi}{128|256|512} builtin
Michael Zuckerman [Sun, 28 Feb 2016 07:39:34 +0000 (07:39 +0000)]
[CLANG] [AVX512] [BUILTIN] Adding PSLL{V|W|Wi}{128|256|512} builtin

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

llvm-svn: 262177

8 years ago[AVX512][PSLLW ][PSLLV] Change imm8 to int
Michael Zuckerman [Sun, 28 Feb 2016 07:32:10 +0000 (07:32 +0000)]
[AVX512][PSLLW ][PSLLV] Change imm8 to int

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

llvm-svn: 262176

8 years agoELF: Remove OutSection class and use a map instead.
Rui Ueyama [Sun, 28 Feb 2016 05:09:11 +0000 (05:09 +0000)]
ELF: Remove OutSection class and use a map instead.

It is easier to handle section filler data separately rather than
merging with section names.

llvm-svn: 262175

8 years agoSimplify. NFC.
Rui Ueyama [Sun, 28 Feb 2016 04:48:54 +0000 (04:48 +0000)]
Simplify. NFC.

llvm-svn: 262174

8 years agoRemove dead header file.
Rui Ueyama [Sun, 28 Feb 2016 04:44:10 +0000 (04:44 +0000)]
Remove dead header file.

llvm-svn: 262173

8 years agoRemove obsolte TODOs. They are for the old gnu driver.
Rui Ueyama [Sun, 28 Feb 2016 04:07:16 +0000 (04:07 +0000)]
Remove obsolte TODOs. They are for the old gnu driver.

llvm-svn: 262172

8 years agoRemove lld/Core/range.h.
Rui Ueyama [Sun, 28 Feb 2016 04:03:01 +0000 (04:03 +0000)]
Remove lld/Core/range.h.

IIUC, range was an experiment to see how N3350 would work in LLD.
It turned out it didn't get traction, and it is basically duplicate
of iterator_range in ADT. We have only two occurrences of range,
and all of them are easily rewritten without it.

http://reviews.llvm.org/D17687

llvm-svn: 262171

8 years agoRemove an empty TODO file.
Rui Ueyama [Sun, 28 Feb 2016 03:34:34 +0000 (03:34 +0000)]
Remove an empty TODO file.

llvm-svn: 262170

8 years agoRemove unused #include.
Rui Ueyama [Sun, 28 Feb 2016 03:27:09 +0000 (03:27 +0000)]
Remove unused #include.

llvm-svn: 262169

8 years agoELF: Add --help option.
Rui Ueyama [Sun, 28 Feb 2016 03:18:09 +0000 (03:18 +0000)]
ELF: Add --help option.

llvm-svn: 262168

8 years agoELF: Add --version option.
Rui Ueyama [Sun, 28 Feb 2016 03:18:07 +0000 (03:18 +0000)]
ELF: Add --version option.

llvm-svn: 262167

8 years agoRemove dead code. This error type is for the old linker script reader.
Rui Ueyama [Sun, 28 Feb 2016 02:51:02 +0000 (02:51 +0000)]
Remove dead code. This error type is for the old linker script reader.

llvm-svn: 262166

8 years agoRemove dead header files.
Rui Ueyama [Sun, 28 Feb 2016 02:47:52 +0000 (02:47 +0000)]
Remove dead header files.

llvm-svn: 262165

8 years agoRemove a few bits of elf from the old linker.
Rafael Espindola [Sun, 28 Feb 2016 02:22:24 +0000 (02:22 +0000)]
Remove a few bits of elf from the old linker.

llvm-svn: 262164

8 years agoDelete the old script parser.
Rafael Espindola [Sun, 28 Feb 2016 02:14:48 +0000 (02:14 +0000)]
Delete the old script parser.

It was ELF specific.

llvm-svn: 262163

8 years agoTest cleanups
Xinliang David Li [Sun, 28 Feb 2016 00:54:28 +0000 (00:54 +0000)]
Test cleanups

llvm-svn: 262162

8 years ago[PGO] add a test for available_externally functions
Xinliang David Li [Sun, 28 Feb 2016 00:45:13 +0000 (00:45 +0000)]
[PGO] add a test for available_externally functions

llvm-svn: 262161

8 years agoRemove dead code.
Rui Ueyama [Sun, 28 Feb 2016 00:37:52 +0000 (00:37 +0000)]
Remove dead code.

llvm-svn: 262160

8 years agoRename elf2 to elf.
Rafael Espindola [Sun, 28 Feb 2016 00:25:54 +0000 (00:25 +0000)]
Rename elf2 to elf.

llvm-svn: 262159

8 years agoRemove the old ELF linker.
Rafael Espindola [Sun, 28 Feb 2016 00:10:58 +0000 (00:10 +0000)]
Remove the old ELF linker.

I think it is clear by now that the new linker is viable.

llvm-svn: 262158

8 years ago[PGO] Remove redundant counter copies for avail_extern functions.
Xinliang David Li [Sat, 27 Feb 2016 23:11:30 +0000 (23:11 +0000)]
[PGO] Remove redundant counter copies for avail_extern functions.

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

llvm-svn: 262157

8 years agoRevert "Fix bug with register values byte order in expression evaluation."
Todd Fiala [Sat, 27 Feb 2016 22:48:50 +0000 (22:48 +0000)]
Revert "Fix bug with register values byte order in expression evaluation."

This reverts commit r262041, which caused asserts starting yesterday on the OS X testbot.

See details in:
https://llvm.org/bugs/show_bug.cgi?id=26758

llvm-svn: 262156

8 years agoELF: Remove relSize function from ICF.cpp. NFC.
Rui Ueyama [Sat, 27 Feb 2016 20:29:45 +0000 (20:29 +0000)]
ELF: Remove relSize function from ICF.cpp. NFC.

llvm-svn: 262155

8 years agoCodeGen: Remove an iterator => pointer conversion, NFC
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 20:27:44 +0000 (20:27 +0000)]
CodeGen: Remove an iterator => pointer conversion, NFC

Part of PR26753.

llvm-svn: 262154

8 years agoAMDGPU: More bits of frame index are known to be zero
Matt Arsenault [Sat, 27 Feb 2016 20:26:57 +0000 (20:26 +0000)]
AMDGPU: More bits of frame index are known to be zero

The maximum private allocation for the whole GPU is 4G,
so the maximum possible index for a single workitem is the
maximum size divided by the smallest granularity for a dispatch.

This increases the number of known zero high bits, which
enables more offset folding. The maximum private size per
workitem with this is 128M but may be smaller still.

llvm-svn: 262153

8 years agoCodeGen: Use MachineInstr& in InlineSpiller::rematerializeFor()
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 20:23:14 +0000 (20:23 +0000)]
CodeGen: Use MachineInstr& in InlineSpiller::rematerializeFor()

InlineSpiller::rematerializeFor() never uses its parameter as an
iterator, so take it by reference instead.  This removes an implicit
conversion from MachineBasicBlock::iterator to MachineInstr*.

llvm-svn: 262152

8 years agoCodeGen: Update LiveIntervalAnalysis API to use MachineInstr&, NFC
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 20:14:29 +0000 (20:14 +0000)]
CodeGen: Update LiveIntervalAnalysis API to use MachineInstr&, NFC

These parameters aren't expected to be null, so take them by reference.

llvm-svn: 262151

8 years agoCodeGen: Change MachineInstr to use MachineInstr&, NFC
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 20:01:33 +0000 (20:01 +0000)]
CodeGen: Change MachineInstr to use MachineInstr&, NFC

Change MachineInstr API to prefer MachineInstr& over MachineInstr*
whenever the parameter is expected to be non-null.  Slowly inching
toward being able to fix PR26753.

llvm-svn: 262149

8 years agoDAGCombiner: Don't unnecessarily swap operands in ReassociateOps
Matt Arsenault [Sat, 27 Feb 2016 19:57:45 +0000 (19:57 +0000)]
DAGCombiner: Don't unnecessarily swap operands in ReassociateOps

In the case where op = add, y = base_ptr, and x = offset, this
transform:

(op y, (op x, c1)) -> (op (op x, y), c1)

breaks the canonical form of add by putting the base pointer in the
second operand and the offset in the first.

This fix is important for the R600 target, because for some address
spaces the base pointer and the offset are stored in separate register
classes. The old pattern caused the ISel code for matching addressing
modes to put the base pointer and offset in the wrong register classes,
which required no-trivial code transformations to fix.

llvm-svn: 262148

8 years ago[UBSan] Fix isDerivedFromAtOffset on iOS ARM64
Filipe Cabecinhas [Sat, 27 Feb 2016 19:57:44 +0000 (19:57 +0000)]
[UBSan] Fix isDerivedFromAtOffset on iOS ARM64

Summary:
iOS on ARM64 doesn't unique RTTI.
Ref: clang's iOS64CXXABI::shouldRTTIBeUnique()

Due to this, pointer-equality will not necessarily work in this
architecture, across dylib boundaries.

dynamic_cast<>() will (as expected) still work, since Apple ships with
one prepared for this, but we can't rely on the type names being
pointer-equal.

I've limited the expensive strcmp check to the specific architecture
which needs it.

Example which triggers this bug:

lib.h:
  struct X {
    virtual ~X() {}
  };
  X *libCall();

lib.mm:
  X *libCall() {
    return new X;
  }

prog.mm:
  int main() {
    X *px = libCall();
    delete px;
  }

Expected output: Nothing
Actual output:
<unknown>: runtime error: member call on address 0x00017001ef50 which does not point to an object of type 'X'
0x00017001ef50: note: object is of type 'X'
 00 00 00 00  60 00 0f 00 01 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for ‘X’

Reviewers: kubabrecka, samsonov, eugenis, rsmith

Subscribers: aemerson, llvm-commits, rengolin

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

llvm-svn: 262147

8 years agoCodeGen: Use MachineInstr& in HashMachineInstr, NFC
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 19:48:01 +0000 (19:48 +0000)]
CodeGen: Use MachineInstr& in HashMachineInstr, NFC

Also update HashEndOfMBB to take MachineBasicBlock&.

llvm-svn: 262146

8 years agoCodeGen: Use MachineInstr& in AntiDepBreaker API, NFC
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 19:33:37 +0000 (19:33 +0000)]
CodeGen: Use MachineInstr& in AntiDepBreaker API, NFC

Take parameters as MachineInstr& instead of MachineInstr* in
AntiDepBreaker API, since these are required to be non-null.  No
functionality change intended.  Looking toward PR26753.

llvm-svn: 262145

8 years agoCodeGen: Assert valid MI in AntiDepBreaker::UpdateDbgValue
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 19:23:34 +0000 (19:23 +0000)]
CodeGen: Assert valid MI in AntiDepBreaker::UpdateDbgValue

This already assumes a valid MI, since it dereferences the MI in an
assertion before checking for null.  At an explicit assert.

llvm-svn: 262144

8 years agoAArch64: Use MachineInstr& in guaranteesZeroRegInBlock(), NFC
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 19:12:54 +0000 (19:12 +0000)]
AArch64: Use MachineInstr& in guaranteesZeroRegInBlock(), NFC

llvm-svn: 262143

8 years agoCodeGen: Update DFAPacketizer API to take MachineInstr&, NFC
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 19:09:00 +0000 (19:09 +0000)]
CodeGen: Update DFAPacketizer API to take MachineInstr&, NFC

In all but one case, change the DFAPacketizer API to take MachineInstr&
instead of MachineInstr*.  In DFAPacketizer::endPacket(), take
MachineBasicBlock::iterator.  Besides cleaning up the API, this is in
search of PR26753.

llvm-svn: 262142

8 years agoWIP: CodeGen: Use MachineInstr& in MachineInstrBundle.h, NFC
Duncan P. N. Exon Smith [Sat, 27 Feb 2016 17:05:33 +0000 (17:05 +0000)]
WIP: CodeGen: Use MachineInstr& in MachineInstrBundle.h, NFC

Update APIs in MachineInstrBundle.h to take and return MachineInstr&
instead of MachineInstr* when the instruction cannot be null.  Besides
being a nice cleanup, this is tacking toward a fix for PR26753.

llvm-svn: 262141

8 years agoWebAssembly: fix build
JF Bastien [Sat, 27 Feb 2016 16:38:23 +0000 (16:38 +0000)]
WebAssembly: fix build

It was broken by the work for PR26753.

llvm-svn: 262140

8 years agoRevert "[sancov] do not instrument nodes that are full pre-dominators"
Renato Golin [Sat, 27 Feb 2016 14:19:19 +0000 (14:19 +0000)]
Revert "[sancov] do not instrument nodes that are full pre-dominators"

This reverts commit r262103, as it broke all ARM and AArch64 bots.

llvm-svn: 262139

8 years agoWorkaround doxygen bug https://bugzilla.gnome.org/show_bug.cgi?id=506243
Alexander Kornienko [Sat, 27 Feb 2016 14:02:08 +0000 (14:02 +0000)]
Workaround doxygen bug https://bugzilla.gnome.org/show_bug.cgi?id=506243

llvm-svn: 262138

8 years agoTidyup for loops - don't repeat upper limit evaluation if you don't have to. NFCI.
Simon Pilgrim [Sat, 27 Feb 2016 13:26:58 +0000 (13:26 +0000)]
Tidyup for loops - don't repeat upper limit evaluation if you don't have to. NFCI.

llvm-svn: 262137

8 years agoCorrecting indentation for an RST code block.
Aaron Ballman [Sat, 27 Feb 2016 13:13:16 +0000 (13:13 +0000)]
Correcting indentation for an RST code block.

llvm-svn: 262136

8 years agoAddition of tests to previous check-in. Tests for coprocessor register usage in Sparc.
Chris Dewhurst [Sat, 27 Feb 2016 12:52:26 +0000 (12:52 +0000)]
Addition of tests to previous check-in. Tests for coprocessor register usage in Sparc.

Previous check-in message was:

The patch adds missing registers and instructions to complete all the registers supported by the Sparc v8 manual.
These are all co-processor registers, with the exception of the floating-point deferred-trap queue register.
Although these will not be lowered automatically by any instructions, it allows the use of co-processor
instructions implemented by inline-assembly.

Code Reviewed at http://reviews.llvm.org/D17133, with the exception of a very small change in brace placement in SparcInstrInfo.td,
which was formerly causing a problem in the disassembly of the %fq register.

llvm-svn: 262135

8 years ago[X86][AVX] vpermilvar.pd mask element indices only use bit1
Simon Pilgrim [Sat, 27 Feb 2016 12:51:46 +0000 (12:51 +0000)]
[X86][AVX] vpermilvar.pd mask element indices only use bit1

llvm-svn: 262134

8 years agoThe patch adds missing registers and instructions to complete all the registers suppo...
Chris Dewhurst [Sat, 27 Feb 2016 12:49:59 +0000 (12:49 +0000)]
The patch adds missing registers and instructions to complete all the registers supported by the Sparc v8 manual.
These are all co-processor registers, with the exception of the floating-point deferred-trap queue register.
Although these will not be lowered automatically by any instructions, it allows the use of co-processor
instructions implemented by inline-assembly.

Code Reviewed at http://reviews.llvm.org/D17133, with the exception of a very small change in brace placement in SparcInstrInfo.td,
which was formerly causing a problem in the disassembly of the %fq register.

llvm-svn: 262133

8 years ago[X86][AVX] Added AVX1 target shuffle combine tests
Simon Pilgrim [Sat, 27 Feb 2016 12:33:08 +0000 (12:33 +0000)]
[X86][AVX] Added AVX1 target shuffle combine tests

llvm-svn: 262132

8 years agoStrip trailing whitespace. NFCI.
Simon Pilgrim [Sat, 27 Feb 2016 11:49:16 +0000 (11:49 +0000)]
Strip trailing whitespace. NFCI.

llvm-svn: 262131

8 years ago[PM] Loosen the regex for the proxy template name even further to cope
Chandler Carruth [Sat, 27 Feb 2016 11:07:16 +0000 (11:07 +0000)]
[PM] Loosen the regex for the proxy template name even further to cope
with 'class' keywords in the template arguments and other silliness.

llvm-svn: 262130

8 years ago[PM] Use a boring regex instead of explicitly naming the analysis
Chandler Carruth [Sat, 27 Feb 2016 10:48:14 +0000 (10:48 +0000)]
[PM] Use a boring regex instead of explicitly naming the analysis
manager as some compilers print the typedef name and others print the
"canonical" name of the underlying class template.

This isn't really an important artifact of the test anyways so it seems
fine to just loosen the test assertions here.

llvm-svn: 262129

8 years ago[PM] Provide explicit instantiation declarations and definitions for the
Chandler Carruth [Sat, 27 Feb 2016 10:45:35 +0000 (10:45 +0000)]
[PM] Provide explicit instantiation declarations and definitions for the
PassManager and AnalysisManager template specializations as well.

llvm-svn: 262128

8 years ago[PM] Provide two templates for the two directionalities of analysis
Chandler Carruth [Sat, 27 Feb 2016 10:38:10 +0000 (10:38 +0000)]
[PM] Provide two templates for the two directionalities of analysis
manager proxies and use those rather than repeating their definition
four times.

There are real differences between the two directions: outer AMs are
const and don't need to have invalidation tracked. But every proxy in
a particular direction is identical except for the analysis manager type
and the IR unit they proxy into. This makes them prime candidates for
nice templates.

I've started introducing explicit template instantiation declarations
and definitions as well because we really shouldn't be emitting all this
everywhere. I'm going to go back and add the same for the other
templates like this in a follow-up patch.

I've left the analysis manager as an opaque type rather than using two
IR units and requiring it to be an AnalysisManager template
specialization. I think its important that users retain the ability to
provide their own custom analysis management layer and provided it has
the appropriate API everything should Just Work.

llvm-svn: 262127

8 years agoAMDGPU: Add builtins for recently added intrinsics
Matt Arsenault [Sat, 27 Feb 2016 09:54:43 +0000 (09:54 +0000)]
AMDGPU: Add builtins for recently added intrinsics

llvm-svn: 262126

8 years agoDAGCombiner: Relax sqrt NaN folding check
Matt Arsenault [Sat, 27 Feb 2016 09:38:05 +0000 (09:38 +0000)]
DAGCombiner: Relax sqrt NaN folding check

This is OK for +0 since compares to +/-0 give the same result.

llvm-svn: 262125

8 years agoAMDGPU: Fix broken/confusing predefined macro
Matt Arsenault [Sat, 27 Feb 2016 09:06:26 +0000 (09:06 +0000)]
AMDGPU: Fix broken/confusing predefined macro

amdgcn should not be defining __R600__

llvm-svn: 262124

8 years agoAMDGPU: Fix inconsistent register name for flat_scratch
Matt Arsenault [Sat, 27 Feb 2016 09:06:22 +0000 (09:06 +0000)]
AMDGPU: Fix inconsistent register name for flat_scratch

llvm-svn: 262123

8 years agoAdd __builtin_canonicalize
Matt Arsenault [Sat, 27 Feb 2016 09:06:18 +0000 (09:06 +0000)]
Add __builtin_canonicalize

llvm-svn: 262122

8 years agoAMDGPU: Split vi-insts subtarget feature
Matt Arsenault [Sat, 27 Feb 2016 08:53:55 +0000 (08:53 +0000)]
AMDGPU: Split vi-insts subtarget feature

This will be more useful for marking builtins acceptable for which
subtargets.

llvm-svn: 262121

8 years agoAMDGPU: Add s_sleep intrinsic
Matt Arsenault [Sat, 27 Feb 2016 08:53:52 +0000 (08:53 +0000)]
AMDGPU: Add s_sleep intrinsic

llvm-svn: 262120

8 years agoAMDGPU: Implement readcyclecounter
Matt Arsenault [Sat, 27 Feb 2016 08:53:46 +0000 (08:53 +0000)]
AMDGPU: Implement readcyclecounter

This matches the behavior of the HSAIL clock instruction.
s_realmemtime is used if the subtarget supports it, and falls
back to s_memtime if not.

Also introduces new intrinsics for each of s_memtime / s_memrealtime.

llvm-svn: 262119