-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LLVM and SPIRV-LLVM-Translator pulldown (WW44)
LLVM: llvm/llvm-project@cb088e8 SPIRV-LLVM-Translator: KhronosGroup/SPIRV-LLVM-Translator@7a559fa
- Loading branch information
Showing
10,401 changed files
with
904,805 additions
and
761,493 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
//===- bolt/Passes/ValidateMemRefs.h ----------------------------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef BOLT_PASSES_VALIDATEMEMREFS_H | ||
#define BOLT_PASSES_VALIDATEMEMREFS_H | ||
|
||
#include "bolt/Passes/BinaryPasses.h" | ||
|
||
namespace llvm::bolt { | ||
|
||
/// Post processing to check for memory references that cause a symbol | ||
/// in data section to be ambiguous, requiring us to avoid moving that | ||
/// object or disambiguating such references. This is currently | ||
/// limited to fixing false references to the location of jump tables. | ||
/// | ||
class ValidateMemRefs : public BinaryFunctionPass { | ||
public: | ||
explicit ValidateMemRefs(const cl::opt<bool> &PrintPass) | ||
: BinaryFunctionPass(PrintPass) {} | ||
|
||
const char *getName() const override { return "validate-mem-refs"; } | ||
|
||
void runOnFunctions(BinaryContext &BC) override; | ||
|
||
private: | ||
bool checkAndFixJTReference(BinaryFunction &BF, MCInst &Inst, | ||
uint32_t OperandNum, const MCSymbol *Sym, | ||
uint64_t Offset); | ||
void runOnFunction(BinaryFunction &BF); | ||
|
||
static std::atomic<std::uint64_t> ReplacedReferences; | ||
}; | ||
|
||
} // namespace llvm::bolt | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.