Skip to content

Amd common merge sep12 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 77 commits into from
Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
05082bd
[libFuzzer] print a failed-merge warning only in the merge mode
kcc Sep 10, 2016
b7ef200
[WebAssembly] Fix typos in comments
aheejin Sep 10, 2016
2752a28
[LTO] Handle null GV in Symbol object
teresajohnson Sep 10, 2016
68d7a57
[gold/LTO] Add test case for r281134
teresajohnson Sep 10, 2016
c220fde
[AMDGPU] Refactor MUBUF/MTBUF instructions
vpykhtin Sep 10, 2016
14e6992
We also need to pass swifterror in R12 under swiftcc not only under ccc
aschwaighofer Sep 10, 2016
792a8ea
[InstCombine] rename and reorganize some icmp folding functions; NFC
rotateright Sep 10, 2016
e117e50
[InstCombine] clean up foldICmpBinOpEqualityWithConstant / foldICmpIn…
rotateright Sep 10, 2016
631d14e
ADT: Use typedefs for ilist_base and ilist_node_base, NFC
dexonsmith Sep 10, 2016
2b4de80
ADT: Move ilist_node_access to ilist_detail::NodeAccess...
dexonsmith Sep 10, 2016
df708a5
Add an isSwiftError predicate to Value
aschwaighofer Sep 10, 2016
17648b3
InstCombine: Don't combine loads/stores from swifterror to a new type
aschwaighofer Sep 10, 2016
ce19c1c
[llvm-cov] Minor visual tweaks for html reports
vedantk Sep 10, 2016
a8edd76
[llvm-cov] Move the 'jump to first unexecuted line' link
vedantk Sep 10, 2016
10c97f0
It should also be legal to pass a swifterror parameter to a call as a…
aschwaighofer Sep 10, 2016
d9a1d02
MCInstrDesc: Flags (uint64_t) was checked using (1 << MCID::XYZ), but…
Sep 10, 2016
c71d5b4
[CodeGen] Split out the notions of MI invariance and MI dereferenceab…
Sep 11, 2016
877859e
[NVPTX] Use ldg for explicitly invariant loads.
Sep 11, 2016
362611f
Add handling of !invariant.load to PropagateMetadata.
Sep 11, 2016
a3215a2
[X86] Make a helper method into a static function local to the cpp file.
topperc Sep 11, 2016
88c0b88
[X86] Side effecting asm in AVX512 integer stack folding test should …
topperc Sep 11, 2016
3679bfe
[AVX-512] Add VPTERNLOG to load folding tables.
topperc Sep 11, 2016
d3eebe7
[AVX-512] Add test cases to demonstrate opportunities for commuting v…
topperc Sep 11, 2016
2628aff
[CodeGen] Make the TwoAddressInstructionPass check if the instruction…
topperc Sep 11, 2016
3daf6c8
[SimplifyCFG] Harden up the profitability heuristic for block splitti…
Sep 11, 2016
16d9e13
[AArch64] Fixup test after r281160
Sep 11, 2016
05bbcbd
[SimplifyCFG] Be even more conservative in SinkThenElseCodeToEnd
Sep 11, 2016
d650689
Fixup failing debuginfo test for change in SimplifyCFG.
Sep 11, 2016
990fea5
[AVX512] Fix pattern for vgetmantsd and all other instructions that u…
Sep 11, 2016
b4bd34e
ADT: Add sentinel tracking and custom tags to ilists
dexonsmith Sep 11, 2016
6037e19
CodeGen: Turn on sentinel tracking for MachineInstr iterators
dexonsmith Sep 11, 2016
025e19e
Fix the modules build after r281167
dexonsmith Sep 11, 2016
00530c8
CodeGen: Assert that bundle iterators are valid
dexonsmith Sep 11, 2016
ce85c7e
[ORC] Rename RPCChannel to RPCByteChannel. NFC.
lhames Sep 11, 2016
d546df8
CodeGen: Give MachineBasicBlock::reverse_iterator a handle to the cur…
dexonsmith Sep 11, 2016
1735568
[ORC] Fix the RPC unit test for header changes in r281171.
lhames Sep 11, 2016
bc1fa10
ADT: Remove ilist_iterator::reset(), NFC
dexonsmith Sep 11, 2016
6b6d496
ScalarOpts: Sort includes, NFC
dexonsmith Sep 11, 2016
c2fec44
ScalarOpts: Use std::list for Candidates, NFC
dexonsmith Sep 11, 2016
dd7c4ea
[ORC] Update examples for header changes in r281171.
lhames Sep 11, 2016
661e8f4
[TwoAddressInstruction] When commuting an instruction don't assume th…
topperc Sep 11, 2016
97e83d0
Analysis: Only allow the move-constructor for IVUsers
dexonsmith Sep 11, 2016
5de5554
ADT: Add AllocatorList, and use it for yaml::Token
dexonsmith Sep 11, 2016
8650ea1
ADT: Fix build after r281182
dexonsmith Sep 11, 2016
a66f054
ADT: Never allocate nodes in iplist<> and ilist<>
dexonsmith Sep 11, 2016
c7f39d7
[InstCombine] regenerate checks
rotateright Sep 12, 2016
278eb07
[InstCombine] regenerate checks
rotateright Sep 12, 2016
52fed49
[InstCombine] add helper function for folding {and,or,xor} (cast X), …
rotateright Sep 12, 2016
afe5d3d
MC: Move MCSection::begin/end to header, NFC
dexonsmith Sep 12, 2016
56e56fb
llvm/test/CodeGen/AMDGPU/infinite-loop-evergreen.ll REQUIRES +Asserts.
chapuni Sep 12, 2016
d186dd4
AVX-512: Added a test case that should be optimized in the future. NFC.
Sep 12, 2016
217343a
Fix WebAssembly broken build related to interface change in r281172.
Sep 12, 2016
7a92e73
GlobalISel: disambiguate types when printing MIR
TNorthover Sep 12, 2016
39f340d
GlobalISel: translate GEP instructions.
TNorthover Sep 12, 2016
5d592ae
GlobalISel: support translation of global addresses.
TNorthover Sep 12, 2016
9c7d316
Define a dummy zlib::uncompress when zlib is not available.
espindola Sep 12, 2016
ccaa95d
Fix the Thumb test for vfloat intrinsics
pbarrio Sep 12, 2016
0c54a06
[LoopInterchange] Improve debug output. NFC.
Sep 12, 2016
30cc1de
[ARM] Promote small global constants to constant pools
Sep 12, 2016
c04a5a1
fix formatting/typos; NFC
rotateright Sep 12, 2016
91db09d
[Thumb] Teach ISel how to lower compares of AND bitmasks efficiently
Sep 12, 2016
724e567
[AMDGPU] Assembler: Move disabled SDWA and DPP instruction into Disab…
samkolton Sep 12, 2016
29b1dcd
[InstCombine] add helper function for foldICmpUsingKnownBits; NFCI
rotateright Sep 12, 2016
97c0650
add select i1 test, reproduser pr30249.
Sep 12, 2016
3e9ba2b
[InstCombine] add tests to show missing vector folds
rotateright Sep 12, 2016
7e05343
fix formatting; NFC
rotateright Sep 12, 2016
5db0b90
[FunctionAttrs] Don't try to infer returned if it is already on an ar…
majnemer Sep 12, 2016
8faa07b
[X86] Copy imp-uses when folding tailcall into conditional branch.
ahmedbougacha Sep 12, 2016
59a2759
[BranchFolding] Unique added live-ins after hoisting code.
ahmedbougacha Sep 12, 2016
0aa0c7d
Revert "[ARM] Promote small global constants to constant pools"
Sep 12, 2016
ce3adfd
[GlobalISel] Fix mismatched "<..)" in intrinsic MO printing. NFC.
ahmedbougacha Sep 12, 2016
01a133c
AMDGPU: Do not clobber SCC in SIWholeQuadMode
nhaehnle Sep 12, 2016
bb4b1d9
[InstCombine] use m_APInt to allow icmp X, C folds for splat constant…
rotateright Sep 12, 2016
11981cd
llvm-objdump: Add --start-address and --stop-address options
Sep 12, 2016
7ee8317
llvm-size: Add --totals option
Sep 12, 2016
c123237
[MCJIT] Fix some inconsistent handling of name mangling inside MCJIT.
lhames Sep 12, 2016
38c948f
Merge branch 'amd-master' into amd-common
tstellarAMD Sep 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1126,10 +1126,11 @@ Currently, only the following parameter attributes are defined:
This attribute is motivated to model and optimize Swift error handling. It
can be applied to a parameter with pointer to pointer type or a
pointer-sized alloca. At the call site, the actual argument that corresponds
to a ``swifterror`` parameter has to come from a ``swifterror`` alloca. A
``swifterror`` value (either the parameter or the alloca) can only be loaded
and stored from, or used as a ``swifterror`` argument. This is not a valid
attribute for return values and can only be applied to one parameter.
to a ``swifterror`` parameter has to come from a ``swifterror`` alloca or
the ``swifterror`` parameter of the caller. A ``swifterror`` value (either
the parameter or the alloca) can only be loaded and stored from, or used as
a ``swifterror`` argument. This is not a valid attribute for return values
and can only be applied to one parameter.

These constraints allow the calling convention to optimize access to
``swifterror`` variables by associating them with a specific register at
Expand Down
4 changes: 2 additions & 2 deletions examples/Kaleidoscope/BuildingAJIT/Chapter5/RemoteJITUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#ifndef LLVM_TOOLS_LLI_REMOTEJITUTILS_H
#define LLVM_TOOLS_LLI_REMOTEJITUTILS_H

#include "llvm/ExecutionEngine/Orc/RPCChannel.h"
#include "llvm/ExecutionEngine/Orc/RPCByteChannel.h"
#include "llvm/ExecutionEngine/RTDyldMemoryManager.h"
#include <mutex>

Expand All @@ -25,7 +25,7 @@
#endif

/// RPC channel that reads from and writes from file descriptors.
class FDRPCChannel final : public llvm::orc::remote::RPCChannel {
class FDRPCChannel final : public llvm::orc::remote::RPCByteChannel {
public:
FDRPCChannel(int InFD, int OutFD) : InFD(InFD), OutFD(OutFD) {}

Expand Down
226 changes: 226 additions & 0 deletions include/llvm/ADT/AllocatorList.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
//===- llvm/ADT/AllocatorList.h - Custom allocator list ---------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_ADT_ALLOCATORLIST_H
#define LLVM_ADT_ALLOCATORLIST_H

#include "llvm/ADT/iterator.h"
#include "llvm/ADT/simple_ilist.h"
#include "llvm/Support/Allocator.h"
#include <type_traits>

namespace llvm {

/// A linked-list with a custom, local allocator.
///
/// Expose a std::list-like interface that owns and uses a custom LLVM-style
/// allocator (e.g., BumpPtrAllocator), leveraging \a simple_ilist for the
/// implementation details.
///
/// Because this list owns the allocator, calling \a splice() with a different
/// list isn't generally safe. As such, \a splice has been left out of the
/// interface entirely.
template <class T, class AllocatorT> class AllocatorList : AllocatorT {
struct Node : ilist_node<Node> {
Node(Node &&) = delete;
Node(const Node &) = delete;
Node &operator=(Node &&) = delete;
Node &operator=(const Node &) = delete;

Node(T &&V) : V(std::move(V)) {}
Node(const T &V) : V(V) {}
template <class... Ts> Node(Ts &&... Vs) : V(std::forward<Ts>(Vs)...) {}
T V;
};

typedef simple_ilist<Node> list_type;
list_type List;

AllocatorT &getAlloc() { return *this; }
const AllocatorT &getAlloc() const { return *this; }

template <class... ArgTs> Node *create(ArgTs &&... Args) {
return new (getAlloc()) Node(std::forward<ArgTs>(Args)...);
}

struct Cloner {
AllocatorList &AL;
Cloner(AllocatorList &AL) : AL(AL) {}
Node *operator()(const Node &N) const { return AL.create(N.V); }
};

struct Disposer {
AllocatorList &AL;
Disposer(AllocatorList &AL) : AL(AL) {}
void operator()(Node *N) const {
N->~Node();
AL.getAlloc().Deallocate(N);
}
};

public:
typedef T value_type;
typedef T *pointer;
typedef T &reference;
typedef const T *const_pointer;
typedef const T &const_reference;
typedef typename list_type::size_type size_type;
typedef typename list_type::difference_type difference_type;

private:
template <class ValueT, class IteratorBase>
class IteratorImpl
: public iterator_adaptor_base<IteratorImpl<ValueT, IteratorBase>,
IteratorBase,
std::bidirectional_iterator_tag, ValueT> {
template <class OtherValueT, class OtherIteratorBase>
friend class IteratorImpl;
friend AllocatorList;

typedef iterator_adaptor_base<IteratorImpl<ValueT, IteratorBase>,
IteratorBase, std::bidirectional_iterator_tag,
ValueT>
base_type;

public:
typedef ValueT value_type;
typedef ValueT *pointer;
typedef ValueT &reference;

IteratorImpl() = default;
IteratorImpl(const IteratorImpl &) = default;
IteratorImpl &operator=(const IteratorImpl &) = default;
~IteratorImpl() = default;

explicit IteratorImpl(const IteratorBase &I) : base_type(I) {}

template <class OtherValueT, class OtherIteratorBase>
IteratorImpl(const IteratorImpl<OtherValueT, OtherIteratorBase> &X,
typename std::enable_if<std::is_convertible<
OtherIteratorBase, IteratorBase>::value>::type * = nullptr)
: base_type(X.wrapped()) {}

reference operator*() const { return base_type::wrapped()->V; }
pointer operator->() const { return &operator*(); }

friend bool operator==(const IteratorImpl &L, const IteratorImpl &R) {
return L.wrapped() == R.wrapped();
}
friend bool operator!=(const IteratorImpl &L, const IteratorImpl &R) {
return !(L == R);
}
};

public:
typedef IteratorImpl<T, typename list_type::iterator> iterator;
typedef IteratorImpl<T, typename list_type::reverse_iterator>
reverse_iterator;
typedef IteratorImpl<const T, typename list_type::const_iterator>
const_iterator;
typedef IteratorImpl<const T, typename list_type::const_reverse_iterator>
const_reverse_iterator;

AllocatorList() = default;
AllocatorList(AllocatorList &&X)
: AllocatorT(std::move(X.getAlloc())), List(std::move(X.List)) {}
AllocatorList(const AllocatorList &X) {
List.cloneFrom(X.List, Cloner(*this), Disposer(*this));
}
AllocatorList &operator=(AllocatorList &&X) {
clear(); // Dispose of current nodes explicitly.
List = std::move(X.List);
getAlloc() = std::move(X.getAlloc());
return *this;
}
AllocatorList &operator=(const AllocatorList &X) {
List.cloneFrom(X.List, Cloner(*this), Disposer(*this));
return *this;
}
~AllocatorList() { clear(); }

void swap(AllocatorList &RHS) {
List.swap(RHS.List);
std::swap(getAlloc(), RHS.getAlloc());
}

bool empty() { return List.empty(); }
size_t size() { return List.size(); }

iterator begin() { return iterator(List.begin()); }
iterator end() { return iterator(List.end()); }
const_iterator begin() const { return const_iterator(List.begin()); }
const_iterator end() const { return const_iterator(List.end()); }
reverse_iterator rbegin() { return reverse_iterator(List.rbegin()); }
reverse_iterator rend() { return reverse_iterator(List.rend()); }
const_reverse_iterator rbegin() const {
return const_reverse_iterator(List.rbegin());
}
const_reverse_iterator rend() const {
return const_reverse_iterator(List.rend());
}

T &back() { return List.back().V; }
T &front() { return List.front().V; }
const T &back() const { return List.back().V; }
const T &front() const { return List.front().V; }

template <class... Ts> iterator emplace(iterator I, Ts &&... Vs) {
return iterator(List.insert(I.wrapped(), *create(std::forward<Ts>(Vs)...)));
}

iterator insert(iterator I, T &&V) {
return iterator(List.insert(I.wrapped(), *create(std::move(V))));
}
iterator insert(iterator I, const T &V) {
return iterator(List.insert(I.wrapped(), *create(V)));
}

template <class Iterator>
void insert(iterator I, Iterator First, Iterator Last) {
for (; First != Last; ++First)
List.insert(I.wrapped(), *create(*First));
}

iterator erase(iterator I) {
return iterator(List.eraseAndDispose(I.wrapped(), Disposer(*this)));
}

iterator erase(iterator First, iterator Last) {
return iterator(
List.eraseAndDispose(First.wrapped(), Last.wrapped(), Disposer(*this)));
}

void clear() { List.clearAndDispose(Disposer(*this)); }
void pop_back() { List.eraseAndDispose(--List.end(), Disposer(*this)); }
void pop_front() { List.eraseAndDispose(List.begin(), Disposer(*this)); }
void push_back(T &&V) { insert(end(), std::move(V)); }
void push_front(T &&V) { insert(begin(), std::move(V)); }
void push_back(const T &V) { insert(end(), V); }
void push_front(const T &V) { insert(begin(), V); }
template <class... Ts> void emplace_back(Ts &&... Vs) {
emplace(end(), std::forward<Ts>(Vs)...);
}
template <class... Ts> void emplace_front(Ts &&... Vs) {
emplace(begin(), std::forward<Ts>(Vs)...);
}

/// Reset the underlying allocator.
///
/// \pre \c empty()
void resetAlloc() {
assert(empty() && "Cannot reset allocator if not empty");
getAlloc().Reset();
}
};

template <class T> using BumpPtrList = AllocatorList<T, BumpPtrAllocator>;

} // end namespace llvm

#endif // LLVM_ADT_ALLOCATORLIST_H
Loading