Doing so could cause the post-unswitching convergent ops to be
control-dependent on the unswitch condition where they were not before.
This check could be refined to allow unswitching where the convergent
operation was already control-dependent on the unswitch condition.
llvm-svn: 249874
Be explicit about changes between pointers and iterators, as with other
recent commits. This transitively removes implicit ilist iterator
conversions from about 20 source files in CodeGen.
llvm-svn: 249869
Remove a few more implicit ilist iterator conversions, this time from
Analysis.cpp and BranchFolding.cpp.
I added a few overloads for `remove()` and `erase()`, which quite
naturally take pointers as well as iterators as parameters. This will
reduce the churn at least in the short term, but I don't really have a
problem with these existing for longer.
llvm-svn: 249867
This covers the common case of operations that cannot be sunk.
Operations that cannot be hoisted should already be handled properly via
the safe-to-speculate rules and mechanisms.
llvm-svn: 249865
Instead check what languages are supported for expressions; use C if available,
but otherwise pick one of the supported languages.
This can be overridden using the target settings.
<rdar://problem/22290878>
llvm-svn: 249864
With this patch we can now read and write inline stacks in sample
profiles to the binary encoded profiles.
In a subsequent patch, I will add a string table to the binary encoding.
Right now function names are emitted as strings every time we find them.
This is too bloated and will produce large files in applications with
lots of inlining.
llvm-svn: 249861
Summary:
Add dependencies to the custom commands so that they get
re-executed as needed.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13580
llvm-svn: 249860
* Avoid computing state needed only by OMPT unless the ompt_enabled flag is set.
* Properly handle a corner case in OMPT where team == NULL.
Patch by John Mellor-Crummey
Differential Revision: http://reviews.llvm.org/D13502
llvm-svn: 249857
Because __kmp_task_init_ompt is called for every initial task in each thread
and always generated task ids, this was a big performance issue on bigger
systems even without any tool attached. After changing the initialization
interface to ompt_tool, we can now rely on already knowing whether a tool is
attached and OMPT is enabled at this point.
Patch by Jonas Hahnfeld
Differential Revision: http://reviews.llvm.org/D13494
llvm-svn: 249855
This was just forgotten when SectionSymbols was introduced and could cause
corruption if the MCContext was reused after Reset.
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13547
llvm-svn: 249854
If a (assumed) invariant location is loaded multiple times we
generated a parameter for each location. However, this caused compile
time problems for several benchmarks (e.g., 445_gobmk in SPEC2006 and
BT in the NAS benchmarks). Additionally, the code we generate is
suboptimal as we preload the same location multiple times and perform
the same checks on all the parameters that refere to the same value.
With this patch we consolidate the invariant loads in three steps:
1) During SCoP initialization required invariant loads are put in
equivalence classes based on their pointer operand. One
representing load is used to generate a parameter for the whole
class, thus we never generate multiple parameters for the same
location.
2) During the SCoP simplification we remove invariant memory
accesses that are in the same equivalence class. While doing so
we build the union of all execution domains as it is only
important that the location is at least accessed once.
3) During code generation we only preload one element of each
equivalence class with the unified execution domain. All others
are mapped to that preloaded value.
Differential Revision: http://reviews.llvm.org/D13338
llvm-svn: 249853
After r249764, if you didn't see the full context, it looked like
`std::next(I)` would get the same result as
`++MachineBasicBlock::iterator(I)`. However, `I` is a `MachineInstr*`
(not a `MachineBasicBlock::iterator`).
Use the `getIterator()` helper I added later (r249782) to make this code
more clear.
llvm-svn: 249852
This reverts commit r249783, fully reinstating r249782. I've fixed the
bug in clang: it was a non-const iterator that dereferenced to const
(but had an implicit conversion to non-const).
llvm-svn: 249850
Since the original commit in r145858, we've had `CFG::graph_iterator`
and `CFG::const_graph_iterator`, and both have derefenced to a
`const`-ified `value_type`. The former has an implicit conversion to
non-`const`, which is how this worked at all until r249782 started using
the dereference operator (partially reverted in r249783).
This fixes the non-const iterator to be non-const (sometimes
const-iterators are intentional, but with a separate const-ified class
(and a non-const implicit conversion leak) that's not likely to be the
case here).
llvm-svn: 249849
http://reviews.llvm.org/D13576
As we are using hierarchical profile, there is no need to keep HeaderLineno a member variable. This is because each level of the inline stack will have its own header lineno. One should use the head lineno of its own inline stack level instead of the actual symbol.
llvm-svn: 249848
from malformed Mach-O files that caused crashes. The first because the
offset in a dyld bind table entry was out of range. The second because their
was no image info section and the routine printing it did not have the
need check to see the section did not exist.
rdar://22983603
llvm-svn: 249845
Summary:
EnablePluginLogging, GetPluginCommandHelp and ExecutePluginCommand aren't
implemented or used anywhere, so remove them from the Hexagon and POSIX
Dynamic Loaders as well as the FreeBSD process.
Reviewers: clayborg, labath, emaste
Subscribers: lldb-commits, emaste
Differential Revision: http://reviews.llvm.org/D13581
llvm-svn: 249840
This reverts commit r249816.
It broke building llvm with lld:
$ ./bin/FileCheck
./bin/FileCheck: error while loading shared libraries: unexpected PLT reloc type 0x06
I think the only thing that is wrong with this patch is that it is too soon.
The plt we create (and its relocs) don't support lazy loading, so they have
to be relocated as ordinary dynamic relocations.
llvm-svn: 249835
Sadly I don't currently have a way to tests this as the driver is always
initialized with the default triple and finding system headers is system
specific.
llvm-svn: 249831
Summary:
Log files produced by dotest have names derived from the test name, and this produces errors in
case we have multiple tests with the same name. Additionally, it's good if the test name explains
what the test is testing (which it clearly doesn't do well if there are multiple tests with
identical names). This commit makes the presence of such tests a hard error.
Reviewers: tberghammer, zturner
Subscribers: iancottrell, lldb-commits
Differential Revision: http://reviews.llvm.org/D13588
llvm-svn: 249828
We want to skip these tests when the target platform is darwin, not
when the host because they have to be enabled in case of darwin ->
android
llvm-svn: 249825