Skip to content

Commit

Permalink
Update LLVM version to c89e46e76
Browse files Browse the repository at this point in the history
A small fixup is required to avoid conflicts between ODS-generated build
methods because of default arguments.  Also, since this keeps failing, I've
updated the llvm cache so that it runs in a separate job.  Otherwise the cache is not updated when the CIRCT build fails.
  • Loading branch information
stephenneuendorffer committed Jul 31, 2020
1 parent 6f53880 commit 49c935f
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
31 changes: 30 additions & 1 deletion .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,37 @@ name: Build and Test
on: [push, pull_request]

jobs:
build-llvm:
name: Build LLVM
runs-on: ubuntu-latest
steps:
- name: Configure Environment
run: echo "::add-path::$GITHUB_WORKSPACE/llvm/install/bin"
- name: Get CIRCT
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Get LLVM Hash
id: get-llvm-hash
run: echo "::set-output name=hash::$(git submodule status)"
shell: bash
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v1
with:
path: llvm
key: ${{ runner.os }}-llvm-install-${{ steps.get-llvm-hash.outputs.hash }}
- name: Rebuild and Install LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
mkdir llvm/build
mkdir llvm/install
cd llvm/build
cmake ../llvm -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_TARGETS_TO_BUILD="host" -DCMAKE_INSTALL_PREFIX=../install -DLLVM_ENABLE_PROJECTS='mlir' -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_ENABLE_BINDINGS=OFF -DLLVM_INSTALL_UTILS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
cmake --build . --target install -- -j$(nproc)
build:
name: Build and Test
needs: build-llvm
runs-on: ubuntu-latest
steps:
- name: Configure Environment
Expand All @@ -23,7 +52,7 @@ jobs:
with:
path: llvm
key: ${{ runner.os }}-llvm-install-${{ steps.get-llvm-hash.outputs.hash }}
- name: Install LLVM
- name: Rebuild and Install LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
mkdir llvm/build
Expand Down
3 changes: 1 addition & 2 deletions lib/Conversion/LLHDToLLVM/LLHDToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1397,8 +1397,7 @@ void llhd::populateLLHDToLLVMConversionPatterns(
// Bitwise conversion patterns.
patterns.insert<NotOpConversion, ShrOpConversion, ShlOpConversion>(ctx,
converter);
patterns.insert<AndOpConversion, OrOpConversion, XorOpConversion>(
converter, LowerToLLVMOptions::getDefaultOptions());
patterns.insert<AndOpConversion, OrOpConversion, XorOpConversion>(converter);

// Unit conversion patterns.
patterns.insert<EntityOpConversion, TerminatorOpConversion, ProcOpConversion,
Expand Down
4 changes: 2 additions & 2 deletions lib/Dialect/FIRRTL/LowerToRTL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ LogicalResult FIRRTLLowering::lowerBinOpToVariadic(Operation *op) {
if (!lhs || !rhs)
return failure();

return setLoweringTo<ResultOpType>(op, ValueRange({lhs, rhs}));
return setLoweringTo<ResultOpType>(op, ValueRange({lhs, rhs}), std::vector<NamedAttribute>{});
}

template <typename ResultOpType>
Expand Down Expand Up @@ -401,4 +401,4 @@ LogicalResult FIRRTLLowering::visitExpr(TailPrimOp op) {
auto inWidth = input.getType().cast<IntegerType>().getWidth();
Type resultType = builder->getIntegerType(inWidth - op.getAmount());
return setLoweringTo<rtl::ExtractOp>(op, resultType, input, 0);
}
}
2 changes: 1 addition & 1 deletion llvm
Submodule llvm updated 5474 files

0 comments on commit 49c935f

Please sign in to comment.