Commit Graph

198317 Commits

Author SHA1 Message Date
Greg Clayton bd5ae6b4de Cleanup virtual methods and mark them as "override" and remove "virtual".
Also fixed an issue with the GUI mode where tree items wouldn't be notified that they were selected. Now selecting a thread or stack frame in the Threads view will update all windows (source, variables, registers).

llvm-svn: 234640
2015-04-10 21:21:09 +00:00
Simon Atanasyan 1c1b4366af [Mips] Fix broken test case
llvm-svn: 234639
2015-04-10 21:19:01 +00:00
Sanjoy Das b6c5914308 [InstCombine][CodeGenPrep] Create llvm.uadd.with.overflow in CGP.
Summary:
This change moves creating calls to `llvm.uadd.with.overflow` from
InstCombine to CodeGenPrep.  Combining overflow check patterns into
calls to the said intrinsic in InstCombine inhibits optimization because
it introduces an intrinsic call that not all other transforms and
analyses understand.

Depends on D8888.

Reviewers: majnemer, atrick

Subscribers: llvm-commits

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

llvm-svn: 234638
2015-04-10 21:07:09 +00:00
Rui Ueyama 74c629be81 ELF: Simplify assignments to "result"
This file is not -Wconversion-clean, and seems like we don't care
about that except these lines. Fix these lines for simplicity.

llvm-svn: 234637
2015-04-10 21:03:20 +00:00
Joerg Sonnenberger 740f3f4a95 Create the correct profiling symbol on NetBSD.
llvm-svn: 234636
2015-04-10 21:02:53 +00:00
Simon Atanasyan 720f52a961 [Mips] Add -pcrel-eh-reloc command line option
This MIPS specific option controls R_MIPS_EH relocation handling.
If -pcrel-eh-reloc is specified R_MIPS_EH relocation should be handled
like R_MIPS_PC32 relocation.

llvm-svn: 234635
2015-04-10 21:00:41 +00:00
Simon Atanasyan 54b1d56c01 [Mips] Support R_MIPS_EH relocation handling
The patch supports just the R_MIPS_EH relocation handling and does not
implement full specification of compact exception tables for MIPS ABIs.

llvm-svn: 234634
2015-04-10 21:00:29 +00:00
Lorenzo Martignoni 4879003022 Extend s{,n}printf custom wrappers to support '*' in the format specifiers
Differential Revision: http://reviews.llvm.org/D8966

llvm-svn: 234633
2015-04-10 20:58:28 +00:00
Simon Atanasyan ada248cd1c [Mips] Replace MipsTargetHandler member function getGP() by getGPAddr()
When we call getGP() we need in fact _gp symbol address. Let's cache its
value and return it directly from the new getGPAddr() function.

llvm-svn: 234632
2015-04-10 20:55:10 +00:00
Simon Atanasyan 1f50cb1d13 [Mips] Use std::call_once for thread safe initialization
The commit is inspired by r234628. Thanks Rui for the idea.

llvm-svn: 234631
2015-04-10 20:55:04 +00:00
Simon Atanasyan 2bafa8342c [Mips] Fix typo in the comment
llvm-svn: 234630
2015-04-10 20:54:58 +00:00
Joerg Sonnenberger 22a2d99e25 Create correct platform-specific target for NetBSD PPC64LE.
llvm-svn: 234629
2015-04-10 20:53:48 +00:00
Rui Ueyama ee0c60679a Fix minor threading issue.
Because calls of applyRelocation is parallelized, all functions
called from that need to be thread-safe. This piece of code
didn't use any synchronization mechanism, so it was not safe.

llvm-svn: 234628
2015-04-10 19:55:35 +00:00
Reid Kleckner aa7a5a3a0f Avoid spewing binary to stdout in some filetype=obj tests
llvm-svn: 234627
2015-04-10 19:36:55 +00:00
Alexander Kornienko f5e72b0448 [clang-tidy] Add readability-simplify-boolean-expr check to clang-tidy
This check looks for comparisons between boolean expressions and boolean
constants and simplifies them to just use the appropriate boolean expression
directly.

if (b == true) becomes if (b)
if (b == false) becomes if (!b)
if (b && true) becomes if (b)
if (b && false) becomes if (false)
if (b || true) becomes if (true)
if (b || false) becomes if (b)
e ? true : false becomes e
e ? false : true becomes !e
if (true) t(); else f(); becomes t();
if (false) t(); else f(); becomes f();
if (e) return true; else return false; becomes return (e);
if (e) return false; else return true; becomes return !(e);
if (e) b = true; else b = false; becomes b = e;
if (e) b = false; else b = true; becomes b = !(e);

http://reviews.llvm.org/D7648

Patch by Richard Thomson!

llvm-svn: 234626
2015-04-10 19:26:43 +00:00
Siva Chandra 18d1696d62 [TestFormatters, TestDataFormatterSynthVal] Mark as xfail.
Summary:
This is to get the bots to go green while a robust solution to fix these
tests is worked out.

Reviewers: chaoren, tberghammer, clayborg

Reviewed By: tberghammer, clayborg

Subscribers: lldb-commits

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

llvm-svn: 234625
2015-04-10 19:25:50 +00:00
Siva Chandra d7a2fc830f [TestAnonymous] Enable all tests for GCC
Summary:
Also added "_with_dsym" prefix to the dsym tests, and "_with_dwarf" to the dwarf tests.


Test Plan: dotest.py -C gcc -p TestAnonymous

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: lldb-commits

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

llvm-svn: 234624
2015-04-10 19:24:48 +00:00
Kaelyn Takata 5cc8535596 Don't eagerly typo-correct to a keyword if the next token is a right paren.
Take advantage of the delayed typo no longer being eagerly corrected to
a keyword to filter out keyword corrections (and other things like
unresolved & overloaded expressions, which have placeholder types) when
correcting typos inside of a decltype().

llvm-svn: 234623
2015-04-10 19:16:46 +00:00
Sanjay Patel 89e28f67cc use update_llc_test_checks.py to tighten checking
test features, not CPUs

remove unnecessary cruft

llvm-svn: 234622
2015-04-10 18:31:42 +00:00
Rafael Espindola c8bc303faa Testcase for the previous commit.
Sorry, fogot to "git add" the previous time.

llvm-svn: 234621
2015-04-10 18:18:17 +00:00
Rafael Espindola d7e306fbcc Actually check if lseek works instead of using a filename based heuristic.
llvm-svn: 234620
2015-04-10 18:16:30 +00:00
Rafael Espindola 74d2f617f2 Remember if lseek works in this FD.
It will be used in clang in a sec.

llvm-svn: 234619
2015-04-10 18:15:51 +00:00
Reid Kleckner 5522d815eb [SEH] Add test for inline functions using SEH helpers
Such helpers should always be comdat with the parent function and have
internal linkage.

llvm-svn: 234618
2015-04-10 18:07:38 +00:00
Duncan P. N. Exon Smith 457bfc779a DebugInfo: Stop leaking temporaries in DIBuilder::createCompileUnit()
Stop leaking temporary nodes from `DIBuilder::createCompileUnit()`.
`replaceAllUsesWith()` doesn't delete the nodes, so we need to delete
them "manually" (well, `TempMDTuple` does that for us).

Similarly, stop leaking the temporary nodes used for variables of
subprograms.

llvm-svn: 234617
2015-04-10 18:01:58 +00:00
Reid Kleckner 7553a4bca0 Really fix exceptions-seh-finally.c
llvm-svn: 234616
2015-04-10 17:53:39 +00:00
Rafael Espindola a4800720b0 Have one raw_fd_ostream constructor forward to the other.
This fixes some odd behavior differences between the two. In particular,
the version that takes a FD no longer unconditionally sets stdout to binary.

llvm-svn: 234615
2015-04-10 17:52:22 +00:00
Reid Kleckner 865c2ca882 Try to fix exceptions-seh-finally.c
llvm-svn: 234614
2015-04-10 17:45:23 +00:00
Reid Kleckner 11859afd5f [SEH] Re-land r234532, but use internal linkage for all SEH helpers
Even though these symbols are in a comdat group, the Microsoft linker
really wants them to have internal linkage.

I'm planning to tweak the mangling in a follow-up change. This is a
straight revert with a 1-line fix.

llvm-svn: 234613
2015-04-10 17:34:52 +00:00
Reid Kleckner 0aa128e219 [Frontend] Close open file handles before renaming output files
The placement of the 'delete' call that was removed in the unique_ptr
migration in r234597 was not an accident. The raw_ostream has to be
destroyed before you do the rename on Windows, otherwise you get
ERROR_ACCESS_DENIED. We can still use unique_ptr, we just need to do a
manual reset().

Also, range-for-loop-ify this code.

llvm-svn: 234612
2015-04-10 17:27:58 +00:00
Reid Kleckner d03f9f4016 [FS] Report errors from llvm::sys::fs::rename on Windows
Previously we would always report success, which is pretty bogus.

I'm too lazy to write a test where rename will portably fail on all
platforms. I'm just trying to fix breakage introduced by r234597, which
happened to tickle this.

llvm-svn: 234611
2015-04-10 17:20:45 +00:00
Oleksiy Vyalov cc81556831 Use llvm::sys::fs::create_directories to create new directory on Windows.
http://reviews.llvm.org/D8977

llvm-svn: 234610
2015-04-10 17:02:26 +00:00
Greg Clayton a625f7bcf4 Check in missing file.
llvm-svn: 234609
2015-04-10 16:48:37 +00:00
Reid Kleckner 6e48a826e8 [WinEH] Try to make outlining invokes work a little better
WinEH currently turns invokes into calls. Long term, we will reconsider
this, but for now, make sure we remap the operands and clone the
successors of the new terminator.

llvm-svn: 234608
2015-04-10 16:26:42 +00:00
Adrian McCarthy 42b33806bf Add logging plugin for Windows
llvm-svn: 234607
2015-04-10 16:18:08 +00:00
Benjamin Kramer b3bcf604d1 [CallSite] Use the injected base class name. NFC.
llvm-svn: 234606
2015-04-10 16:02:34 +00:00
Tobias Grosser aa7f0f8d5c Drop ISL_INSTALL path
There is no need for an isl install path anymore. isl is now part of Polly.

llvm-svn: 234605
2015-04-10 15:41:14 +00:00
Timur Iskhodzhanov bd989e78f1 [ASan] Use a better name for a function parameter
llvm-svn: 234604
2015-04-10 15:31:16 +00:00
Hal Finkel a9fceb803d [PowerPC] Prefetching should also consider depth > 1 loops
Iterating over loops from the LoopInfo instance only provides top-level loops.
We need to search the whole tree of loops to find the inner ones.

llvm-svn: 234603
2015-04-10 15:05:02 +00:00
Timur Iskhodzhanov ea1f332b79 Split Mprotect into MmapNoAccess and MprotectNoAccess to be more portable
On Windows, we have to know if a memory to be protected is mapped or not.
On POSIX, Mprotect was semantically different from mprotect most people know.

llvm-svn: 234602
2015-04-10 15:02:19 +00:00
Benjamin Kramer 3a09ef64ee [CallSite] Make construction from Value* (or Instruction*) explicit.
CallSite roughly behaves as a common base CallInst and InvokeInst. Bring
the behavior closer to that model by making upcasts explicit. Downcasts
remain implicit and work as before.

Following dyn_cast as a mental model checking whether a Value *V isa
CallSite now looks like this: 
  if (auto CS = CallSite(V)) // think dyn_cast
instead of:
  if (CallSite CS = V)

This is an extra token but I think it is slightly clearer. Making the
ctor explicit has the advantage of not accidentally creating nullptr
CallSites, e.g. when you pass a Value * to a function taking a CallSite
argument.

llvm-svn: 234601
2015-04-10 14:50:08 +00:00
Benjamin Kramer c19cde119d Don't rely on implicit CallSite construction.
llvm-svn: 234600
2015-04-10 14:49:31 +00:00
Rafael Espindola 5cb3cf0312 Try to make MSVC happy.
llvm-svn: 234599
2015-04-10 14:37:39 +00:00
Rafael Espindola c80a40661c Return std::unique_ptr to avoid a release and recreate.
llvm-svn: 234598
2015-04-10 14:30:43 +00:00
Rafael Espindola 269ec0f470 Use a std::unique_ptr to make it easier to see who owns the stream.
llvm-svn: 234597
2015-04-10 14:11:52 +00:00
Szabolcs Sipos 8429681d57 [clang-tidy] Fix for llvm.org/PR23161
The misc-static-assert check will not warn on the followings:
  assert("Some message" == NULL);
  assert(NULL == "Some message");

llvm-svn: 234596
2015-04-10 13:55:39 +00:00
Toma Tabacu ae47f93b74 [mips] [IAS] Improve comments in MipsAsmParser::expandLoadImm. NFC.
llvm-svn: 234595
2015-04-10 13:28:16 +00:00
Chad Rosier 518659d9b4 [AArch64] Changes some SchedAlias to WriteRes for Cortex-A57.
Using SchedAliases is convenient and works well for latency and resource
lookup for instructions.  However, this creates an entry in
AArch64WriteLatencyTable with a WriteResourceID of 0, breaking any
SchedReadAdvance since the lookup will fail.

http://reviews.llvm.org/D8043
Patch by Dave Estes <cestes@codeaurora.org>!

llvm-svn: 234594
2015-04-10 13:19:27 +00:00
Chad Rosier a82c876045 [AArch64] Adjusts Cortex-A57 machine model to handle zero shift.
http://reviews.llvm.org/D8043
Patch by Dave Estes <cestes@codeaurora.org>!

llvm-svn: 234593
2015-04-10 13:19:21 +00:00
Rafael Espindola bfd25d4d8a Return a pointer instead of having a pointer outparam and a bool return.
llvm-svn: 234592
2015-04-10 13:14:31 +00:00
Aaron Ballman fe47a98c18 Initializing an uninitialized data member; should be NFC.
llvm-svn: 234591
2015-04-10 13:05:04 +00:00