mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-24 08:18:33 +00:00
Revert "make reciprocal estimate code generation more flexible by adding command-line options"
This reverts commit r238051. It broke some bots: http://lab.llvm.org:8011/builders/llvm-ppc64-linux1/builds/18190 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238075 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#include "llvm/Support/Host.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include "llvm/Target/TargetRecip.h"
|
||||
#include <string>
|
||||
using namespace llvm;
|
||||
|
||||
@@ -153,12 +152,6 @@ FuseFPOps("fp-contract",
|
||||
"Only fuse FP ops when the result won't be effected."),
|
||||
clEnumValEnd));
|
||||
|
||||
cl::list<std::string>
|
||||
ReciprocalOps("recip",
|
||||
cl::CommaSeparated,
|
||||
cl::desc("Choose reciprocal operation types and parameters."),
|
||||
cl::value_desc("all,none,default,divf,!vec-sqrtd,vec-divd:0,sqrt:9..."));
|
||||
|
||||
cl::opt<bool>
|
||||
DontPlaceZerosInBSS("nozero-initialized-in-bss",
|
||||
cl::desc("Don't place zero-initialized symbols into bss section"),
|
||||
@@ -238,7 +231,6 @@ static inline TargetOptions InitTargetOptionsFromCodeGenFlags() {
|
||||
Options.LessPreciseFPMADOption = EnableFPMAD;
|
||||
Options.NoFramePointerElim = DisableFPElim;
|
||||
Options.AllowFPOpFusion = FuseFPOps;
|
||||
Options.Reciprocals = ReciprocalOps;
|
||||
Options.UnsafeFPMath = EnableUnsafeFPMath;
|
||||
Options.NoInfsFPMath = EnableNoInfsFPMath;
|
||||
Options.NoNaNsFPMath = EnableNoNaNsFPMath;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#ifndef LLVM_TARGET_TARGETOPTIONS_H
|
||||
#define LLVM_TARGET_TARGETOPTIONS_H
|
||||
|
||||
#include "llvm/Target/TargetRecip.h"
|
||||
#include "llvm/MC/MCTargetOptions.h"
|
||||
#include <string>
|
||||
|
||||
@@ -72,8 +71,7 @@ namespace llvm {
|
||||
CompressDebugSections(false), FunctionSections(false),
|
||||
DataSections(false), UniqueSectionNames(true), TrapUnreachable(false),
|
||||
TrapFuncName(), FloatABIType(FloatABI::Default),
|
||||
AllowFPOpFusion(FPOpFusion::Standard), Reciprocals(),
|
||||
JTType(JumpTable::Single),
|
||||
AllowFPOpFusion(FPOpFusion::Standard), JTType(JumpTable::Single),
|
||||
ThreadModel(ThreadModel::POSIX) {}
|
||||
|
||||
/// PrintMachineCode - This flag is enabled when the -print-machineinstrs
|
||||
@@ -212,9 +210,6 @@ namespace llvm {
|
||||
/// the value of this option.
|
||||
FPOpFusion::FPOpFusionMode AllowFPOpFusion;
|
||||
|
||||
/// This class encapsulates options for reciprocal-estimate code generation.
|
||||
TargetRecip Reciprocals;
|
||||
|
||||
/// JTType - This flag specifies the type of jump-instruction table to
|
||||
/// create for functions that have the jumptable attribute.
|
||||
JumpTable::JumpTableType JTType;
|
||||
@@ -249,7 +244,6 @@ inline bool operator==(const TargetOptions &LHS,
|
||||
ARE_EQUAL(TrapFuncName) &&
|
||||
ARE_EQUAL(FloatABIType) &&
|
||||
ARE_EQUAL(AllowFPOpFusion) &&
|
||||
ARE_EQUAL(Reciprocals) &&
|
||||
ARE_EQUAL(JTType) &&
|
||||
ARE_EQUAL(ThreadModel) &&
|
||||
ARE_EQUAL(MCOptions);
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
//===--------------------- llvm/Target/TargetRecip.h ------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This class is used to customize machine-specific reciprocal estimate code
|
||||
// generation in a target-independent way.
|
||||
// If a target does not support operations in this specification, then code
|
||||
// generation will default to using supported operations.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_TARGET_TARGETRECIP_H
|
||||
#define LLVM_TARGET_TARGETRECIP_H
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
struct TargetRecip {
|
||||
public:
|
||||
TargetRecip();
|
||||
|
||||
/// Initialize all or part of the operations from command-line options or
|
||||
/// a front end.
|
||||
TargetRecip(const std::vector<std::string> &Args);
|
||||
|
||||
/// Set whether a particular reciprocal operation is enabled and how many
|
||||
/// refinement steps are needed when using it. Use "all" to set enablement
|
||||
/// and refinement steps for all operations.
|
||||
void setDefaults(const StringRef &Key, bool Enable, unsigned RefSteps);
|
||||
|
||||
/// Return true if the reciprocal operation has been enabled by default or
|
||||
/// from the command-line. Return false if the operation has been disabled
|
||||
/// by default or from the command-line.
|
||||
bool isEnabled(const StringRef &Key) const;
|
||||
|
||||
/// Return the number of iterations necessary to refine the
|
||||
/// the result of a machine instruction for the given reciprocal operation.
|
||||
unsigned getRefinementSteps(const StringRef &Key) const;
|
||||
|
||||
bool operator==(const TargetRecip &Other) const;
|
||||
|
||||
private:
|
||||
enum {
|
||||
Uninitialized = -1
|
||||
};
|
||||
|
||||
struct RecipParams {
|
||||
int8_t Enabled;
|
||||
int8_t RefinementSteps;
|
||||
|
||||
RecipParams() : Enabled(Uninitialized), RefinementSteps(Uninitialized) {}
|
||||
};
|
||||
|
||||
std::map<StringRef, RecipParams> RecipMap;
|
||||
typedef std::map<StringRef, RecipParams>::iterator RecipIter;
|
||||
typedef std::map<StringRef, RecipParams>::const_iterator ConstRecipIter;
|
||||
|
||||
bool parseGlobalParams(const std::string &Arg);
|
||||
void parseIndividualParams(const std::vector<std::string> &Args);
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user