Commit Graph

2037 Commits

Author SHA1 Message Date
Duncan P. N. Exon Smith
a9a077681d ADT: Allow up to 18 arguments in hash_combine()
I just realized that the specialized metadata node patch I'm about to
commit won't compile on old compilers.  Bump `hash_combine()`'s support
for non-variadic templates to 18 (I tested this by reversing the logic
in the #ifdef).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228629 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-09 23:21:05 +00:00
Benjamin Kramer
ff53b757ea SmallVector: Move emplace_back to SmallVectorImpl.
This resolves the strange effect that emplace_back is only available
when the type contained in the vector is not trivially copyable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228496 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-07 16:41:02 +00:00
Duncan P. N. Exon Smith
97ec768f7f ADT: Add int64_t interoperability to APSInt
Add some API to `APSInt` to make it easier to compare with `int64_t`.

  - `APSInt::compareValues(APSInt, APSInt)` returns 1, -1 or 0 for
    greater, lesser, or equal, doing the right thing for mismatched
    "has-sign" and bitwidths.  This is just like `isSameValue()` (and is
    now the implementation of it).
  - `APSInt::get(int64_t)` gets a signed `APSInt`.
  - `operator<(int64_t)`, etc., are implemented trivially via `get()`
    and `compareValues()`.
  - Also added `APSInt::getUnsigned(uint64_t)` to make it easier to test
    `compareValues()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228239 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 00:17:43 +00:00
Reid Kleckner
cfa2c32166 Remove useless call to isOSCygMing()
This used to do something when we modeled the Cygwin and MinGW
environments as distinct OSs, but now it is not needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228229 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04 23:17:19 +00:00
David Blaikie
fb29a70867 STLExtras: Provide less/equal functors with templated function call operators, plus a deref'ing functor template utility
Similar to the C++14 void specializations of these templates, useful as
a stop-gap until LLVM switches to '14.

Example use-cases in tblgen because I saw some functors that looked like
they could be simplified/refactored.

Reviewers: dexonsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227828 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-02 18:35:10 +00:00
Benjamin Kramer
c400986f57 FoldingSetVectorIterator is just a subset of pointee_iterator, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227761 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-01 19:26:05 +00:00
Adam Nemet
d46418f870 Include cstddef in EquivalenceClasses.h
This is to try to appease bots complaining that ptrdiff_t is undefined in
LoopAccessAnalysis.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227757 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-01 17:21:06 +00:00
Alex Rosenberg
f6c7255d5f Add the triple for the Sony Playstation®4.
Lots more to follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227060 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-25 22:46:59 +00:00
Alexei Starovoitov
4fe85c7548 BPF backend
Summary:
V8->V9:
- cleanup tests

V7->V8:
- addressed feedback from David:
- switched to range-based 'for' loops
- fixed formatting of tests

V6->V7:
- rebased and adjusted AsmPrinter args
- CamelCased .td, fixed formatting, cleaned up names, removed unused patterns
- diffstat: 3 files changed, 203 insertions(+), 227 deletions(-)

V5->V6:
- addressed feedback from Chandler:
- reinstated full verbose standard banner in all files
- fixed variables that were not in CamelCase
- fixed names of #ifdef in header files
- removed redundant braces in if/else chains with single statements
- fixed comments
- removed trailing empty line
- dropped debug annotations from tests
- diffstat of these changes:
  46 files changed, 456 insertions(+), 469 deletions(-)

V4->V5:
- fix setLoadExtAction() interface
- clang-formated all where it made sense

V3->V4:
- added CODE_OWNERS entry for BPF backend

V2->V3:
- fix metadata in tests

V1->V2:
- addressed feedback from Tom and Matt
- removed top level change to configure (now everything via 'experimental-backend')
- reworked error reporting via DiagnosticInfo (similar to R600)
- added few more tests
- added cmake build
- added Triple::bpf
- tested on linux and darwin

V1 cover letter:
---------------------
recently linux gained "universal in-kernel virtual machine" which is called
eBPF or extended BPF. The name comes from "Berkeley Packet Filter", since
new instruction set is based on it.
This patch adds a new backend that emits extended BPF instruction set.

The concept and development are covered by the following articles:
http://lwn.net/Articles/599755/
http://lwn.net/Articles/575531/
http://lwn.net/Articles/603983/
http://lwn.net/Articles/606089/
http://lwn.net/Articles/612878/

One of use cases: dtrace/systemtap alternative.

bpf syscall manpage:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b4fc1a460f3017e958e6a8ea560ea0afd91bf6fe

instruction set description and differences vs classic BPF:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/filter.txt

Short summary of instruction set:
- 64-bit registers
  R0      - return value from in-kernel function, and exit value for BPF program
  R1 - R5 - arguments from BPF program to in-kernel function
  R6 - R9 - callee saved registers that in-kernel function will preserve
  R10     - read-only frame pointer to access stack
- two-operand instructions like +, -, *, mov, load/store
- implicit prologue/epilogue (invisible stack pointer)
- no floating point, no simd

Short history of extended BPF in kernel:
interpreter in 3.15, x64 JIT in 3.16, arm64 JIT, verifier, bpf syscall in 3.18, more to come in the future.

It's a very small and simple backend.
There is no support for global variables, arbitrary function calls, floating point, varargs,
exceptions, indirect jumps, arbitrary pointer arithmetic, alloca, etc.
From C front-end point of view it's very restricted. It's done on purpose, since kernel
rejects all programs that it cannot prove safe. It rejects programs with loops
and with memory accesses via arbitrary pointers. When kernel accepts the program it is
guaranteed that program will terminate and will not crash the kernel.

This patch implements all 'must have' bits. There are several things on TODO list,
so this is not the end of development.
Most of the code is a boiler plate code, copy-pasted from other backends.
Only odd things are lack or < and <= instructions, specialized load_byte intrinsics
and 'compare and goto' as single instruction.
Current instruction set is fixed, but more instructions can be added in the future.

Signed-off-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>

Subscribers: majnemer, chandlerc, echristo, joerg, pete, rengolin, kristof.beyls, arsenm, t.p.northover, tstellarAMD, aemerson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227008 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-24 17:51:26 +00:00
Chandler Carruth
6f409cbc05 [PM] Rework how the TargetLibraryInfo pass integrates with the new pass
manager to support the actual uses of it. =]

When I ported instcombine to the new pass manager I discover that it
didn't work because TLI wasn't available in the right places. This is
a somewhat surprising and/or subtle aspect of the new pass manager
design that came up before but I think is useful to be reminded of:

While the new pass manager *allows* a function pass to query a module
analysis, it requires that the module analysis is already run and cached
prior to the function pass manager starting up, possibly with
a 'require<foo>' style utility in the pass pipeline. This is an
intentional hurdle because using a module analysis from a function pass
*requires* that the module analysis is run prior to entering the
function pass manager. Otherwise the other functions in the module could
be in who-knows-what state, etc.

A somewhat surprising consequence of this design decision (at least to
me) is that you have to design a function pass that leverages
a module analysis to do so as an optional feature. Even if that means
your function pass does no work in the absence of the module analysis,
you have to handle that possibility and remain conservatively correct.
This is a natural consequence of things being able to invalidate the
module analysis and us being unable to re-run it. And it's a generally
good thing because it lets us reorder passes arbitrarily without
breaking correctness, etc.

This ends up causing problems in one case. What if we have a module
analysis that is *definitionally* impossible to invalidate. In the
places this might come up, the analysis is usually also definitionally
trivial to run even while other transformation passes run on the module,
regardless of the state of anything. And so, it follows that it is
natural to have a hard requirement on such analyses from a function
pass.

It turns out, that TargetLibraryInfo is just such an analysis, and
InstCombine has a hard requirement on it.

The approach I've taken here is to produce an analysis that models this
flexibility by making it both a module and a function analysis. This
exposes the fact that it is in fact safe to compute at any point. We can
even make it a valid CGSCC analysis at some point if that is useful.
However, we don't want to have a copy of the actual target library info
state for each function! This state is specific to the triple. The
somewhat direct and blunt approach here is to turn TLI into a pimpl,
with the state and mutators in the implementation class and the query
routines primarily in the wrapper. Then the analysis can lazily
construct and cache the implementations, keyed on the triple, and
on-demand produce wrappers of them for each function.

One minor annoyance is that we will end up with a wrapper for each
function in the module. While this is a bit wasteful (one pointer per
function) it seems tolerable. And it has the advantage of ensuring that
we pay the absolute minimum synchronization cost to access this
information should we end up with a nice parallel function pass manager
in the future. We could look into trying to mark when analysis results
are especially cheap to recompute and more eagerly GC-ing the cached
results, or we could look at supporting a variant of analyses whose
results are specifically *not* cached and expected to just be used and
discarded by the consumer. Either way, these seem like incremental
enhancements that should happen when we start profiling the memory and
CPU usage of the new pass manager and not before.

The other minor annoyance is that if we end up using the TLI in both
a module pass and a function pass, those will be produced by two
separate analyses, and thus will point to separate copies of the
implementation state. While a minor issue, I dislike this and would like
to find a way to cleanly allow a single analysis instance to be used
across multiple IR unit managers. But I don't have a good solution to
this today, and I don't want to hold up all of the work waiting to come
up with one. This too seems like a reasonable thing to incrementally
improve later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226981 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-24 02:06:09 +00:00
Lang Hames
efd63170c8 [ADT] Add move operations to SmallVector<T,N> from SmallVectorImpl<T>.
This makes it possible to move between SmallVectors of different sizes.

Thanks to Dave Blaikie and Duncan Smith for patch feedback.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226899 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-23 06:25:17 +00:00
Michael Gottesman
eb71fa415e [tinyptrvector] Add in a MutableArrayRef implicit conversion operator to complement the ArrayRef implicit conversion operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226428 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-19 03:25:33 +00:00
Michael Gottesman
75dd736002 Change using => typedef to please the MSVC bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226425 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-19 02:38:16 +00:00
Michael Gottesman
b0b28ca485 Hide the state of TinyPtrVector and remove the single element constructor.
There is no reason for this state to be exposed as public. The single element
constructor was superfulous in light of the single element ArrayRef
constructor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226424 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-19 02:09:54 +00:00
Chandler Carruth
1b279144ec [cleanup] Re-sort all the #include lines in LLVM using
utils/sort_includes.py.

I clearly haven't done this in a while, so more changed than usual. This
even uncovered a missing include from the InstrProf library that I've
added. No functionality changed here, just mechanical cleanup of the
include order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225974 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-14 11:23:27 +00:00
Chandler Carruth
6c92f6eb6a [ADT] Remove the unused default constructor for iterator_range.
This default constructor is a bit weird. It left the range in an invalid
state. That might be reasonable so that you can construct a local
iterator range and assign to it based on some logic to compute the range
you want. If folks would like to support that use case, I can add it
back, but in 238-odd usages none have actually wanted to do this. ;]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225592 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-11 01:16:26 +00:00
Ahmed Bougacha
8a19eb2a85 [ADT][SmallVector] Flip an assert comparison to avoid overflows yielding false-negatives. NFC.
r221973 changed SmallVector::operator[] to use size_t instead of unsigned.

Before that, on 64bit platforms, when a large index (say -1) was passed,
truncating it to unsigned avoided an overflow when computing 'begin() + idx',
and failed the range checking assertion, as expected.
With r221973, idx isn't truncated, so the addition wraps to
'(char*)begin() - 1', and doesn't fire anymore when it should have done so.

This commit changes the comparison to instead compute 'end() - begin()'
(i.e., 'size()'), which avoids potentially overflowing additions, and
correctly triggers the assertion when values such as -1 are passed.
Note that the problem already existed before that revision, on platforms
where sizeof(size_t) == sizeof(unsigned).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225338 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-07 02:42:01 +00:00
Tom Stellard
a31ae5e0b0 Triple: Add amdgcn triple
This will be used for AMD GPUs with the Graphics Core Next architecture,
which are currently using by the r600 triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225276 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-06 18:00:00 +00:00
Michael Gottesman
16c2e77337 Convert SmallMapVector from a class to a struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225158 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-05 08:55:19 +00:00
Michael Gottesman
31379e2e69 Revert "Just use a using directive in SmallMapVector instead of inheriting from MapVector itself."
This reverts commit r225059. I think MSVC 2012 has a problem with this. This is
an attempt to fix one of the MSVC 2012 bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225065 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-01 13:54:05 +00:00
Chandler Carruth
4b77e07165 Revert r225053: Add an ArrayRef upcasting constructor from ArrayRef<U*> -> ArrayRef<T*> where T is a base of U.
This appears to have broken at least the windows build bots due to
compile errors in the predicate that didn't simply supress the overload.
I'm not sure what the fix is, and the bots have been broken for a long
time now so I'm just reverting until Michael can figure out a fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225064 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-01 13:01:25 +00:00
Michael Gottesman
81b226e135 Just use a using directive in SmallMapVector instead of inheriting from MapVector itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225059 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-01 08:05:41 +00:00
Michael Gottesman
69338a993e Add 2x constructors for TinyPtrVector, one that takes in one elemenet and the other that takes in an ArrayRef<EltTy>
Currently one can only construct an empty TinyPtrVector. These are just missing
elements of the API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225055 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-31 23:33:24 +00:00
Michael Gottesman
4ba553c0f3 Add a SmallMapVector class that is a MapVector with a Map of SmallDenseMap and a Vector of SmallVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225054 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-31 23:33:21 +00:00
Michael Gottesman
735f1df049 Add an ArrayRef upcasting constructor from ArrayRef<U*> -> ArrayRef<T*> where T is a base of U.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225053 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-31 23:33:18 +00:00
Rafael Espindola
a21d820952 Add segmented stack support for DragonFlyBSD.
Patch by Michael Neumann.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224936 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-29 15:47:28 +00:00
David Blaikie
1b2c37ecce Update SmallPtrSet::insert's doc comment to match the new return type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224619 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-19 21:45:11 +00:00
Michael Ilseman
9ecdca9115 Silence more static analyzer warnings.
Add in definedness checks for shift operators, null checks when
pointers are assumed by the code to be non-null, and explicit
unreachables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224255 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 18:48:43 +00:00
Aaron Ballman
978aeec05a Silencing a *lot* of -Wsign-compare warnings; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224194 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-13 16:53:15 +00:00
Michael Ilseman
3f0e8837be Clean up static analyzer warnings.
Clang's static analyzer found several potential cases of undefined
behavior, use of un-initialized values, and potentially null pointer
dereferences in tablegen, Support, MC, and ADT. This cleans them up
with specific assertions on the assumptions of the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224154 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-12 21:48:03 +00:00
Duncan P. N. Exon Smith
4bedb48751 Bitcode: Use unsigned char to record MDStrings
`MDString`s can have arbitrary characters in them.  Prevent an assertion
that fired in `BitcodeWriter` because of sign extension by copying the
characters into the record as `unsigned char`s.

Based on a patch by Keno Fischer; fixes PR21882.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224077 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-11 23:34:30 +00:00
Benjamin Kramer
2cd5836249 Make the DenseMap bucket type configurable and use a smaller bucket for DenseSet.
DenseSet used to be implemented as DenseMap<Key, char>, which usually doubled
the memory footprint of the map. Now we use a compressed set so the second
element uses no memory at all. This required some surgery on DenseMap as
all accesses to the bucket now have to go through methods; this should
have no impact on the behavior of DenseMap though. The new default bucket
type for DenseMap is a slightly extended std::pair as we expose it through
DenseMap's iterator and don't want to break any existing users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223588 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 19:22:44 +00:00
Benjamin Kramer
51df2c2a10 Reapply "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."
This reapplies r223478 with a fix for 32 bit targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223586 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 13:12:56 +00:00
Benjamin Kramer
d46a8180c0 Revert "LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps."
Somehow made DenseMap probe on forever on 32 bit machines.
This reverts commit r223478.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223546 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-06 00:02:31 +00:00
Benjamin Kramer
472e9cc4bc LLVMContext: Store APInt/APFloat directly into the ConstantInt/FP DenseMaps.
Required some APInt massaging to get proper empty/tombstone values. Apart
from making the code a bit simpler this also reduces the bucket size of
the ConstantInt map from 32 to 24 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223478 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 17:03:01 +00:00
Duncan P. N. Exon Smith
afcbfb40fb ADT: Remove GetStringMapEntryFromValue()
It relies on undefined behaviour, since `StringMapEntry<>` is not
a standard layout type.  There are no users anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223439 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-05 01:41:36 +00:00
Alexey Samsonov
59d867405a Revert "Fix UBSan report in StringMap implementation."
This reverts commit r223402. Some bots fail with -Winvalid-offsetof
warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223407 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-04 23:00:50 +00:00
Alexey Samsonov
8bc0067071 Fix UBSan report in StringMap implementation.
Use offsetof() instead of a member access within null pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223402 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-04 22:45:31 +00:00
Rafael Espindola
a300b8d7e4 Use size_type in the interface exposed by SmallVector.
This matches std::vector and should avoid unnecessary masking to 32 bits
when calling them on o 64 bits system.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223365 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-04 14:40:35 +00:00
Duncan P. N. Exon Smith
59c9cb75d2 ADT: Rename argument in emplace_back_impl
Rename a functor argument in r223201 from `emplace` to `construct` to
reduce confusion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223212 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03 05:53:24 +00:00
Duncan P. N. Exon Smith
ba2915d05c ADT: Add SmallVector<>::emplace_back(): fixup
Add missing `void` return type from `!LLVM_HAS_VARIADIC_TEMPLATES` case
in r223201.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223202 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03 04:49:16 +00:00
Duncan P. N. Exon Smith
fe03508abd ADT: Add SmallVector<>::emplace_back()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223201 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-03 04:45:09 +00:00
Pete Cooper
dfc69d2c27 Use a typed enum instead of 'unsigned char' for packed field. NFC.
This makes it easier to debug Twine as the 'Kind' fields now show their enum values in lldb and not escaped characters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223178 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-02 23:34:23 +00:00
Tom Stellard
fcf4242b9b Triple: Add AMDHSA operating system type
This operating system type represents the AMD HSA runtime,
and will be required by the R600 backend in order to generate
correct code for this runtime.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223124 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-02 16:45:47 +00:00
Simon Pilgrim
53a43d38df Tidied up target triple OS detection. NFC
Use Triple::isOS*() helper functions where possible.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222622 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-22 19:12:10 +00:00
Michael Ilseman
deb068a5cb Update template specialization to reflect API changes.
po_iterator_storage's insertEdge was updated to reflect the API
changes from many of our insert methods in r222334, however the
template specialization for external storage was not updated. This
updates the specialization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222446 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-20 19:33:30 +00:00
Saleem Abdulrasool
06f9f40a1e ADT: windows itanium targets msvcrt.dll
Update the isOSMSVCRT to correctly identify that windows-itanium uses
msvcrt.dll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222389 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-19 21:55:31 +00:00
David Blaikie
c58082616a Add missing header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222337 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-19 08:12:55 +00:00
David Blaikie
5401ba7099 Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard
library's associative container insert function.

This lead to updating SmallSet::insert to return pair<iterator, bool>,
and then to update SmallPtrSet::insert to return pair<iterator, bool>,
and then to update all the existing users of those functions...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222334 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-19 07:49:26 +00:00
David Blaikie
1d4f28c6bc Remove StringMap::GetOrCreateValue in favor of StringMap::insert
Having two ways to do this doesn't seem terribly helpful and
consistently using the insert version (which we already has) seems like
it'll make the code easier to understand to anyone working with standard
data structures. (I also updated many references to the Entry's
key and value to use first() and second instead of getKey{Data,Length,}
and get/setValue - for similar consistency)

Also removes the GetOrCreateValue functions so there's less surface area
to StringMap to fix/improve/change/accommodate move semantics, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222319 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-19 05:49:42 +00:00