Skip to content

Commit

Permalink
Fix known typos
Browse files Browse the repository at this point in the history
Sweep the codebase for common typos. Includes some changes to visible function
names that were misspelt.

llvm-svn: 200018
  • Loading branch information
atoker committed Jan 24, 2014
1 parent ad6aa47 commit cb40291
Show file tree
Hide file tree
Showing 111 changed files with 233 additions and 232 deletions.
2 changes: 1 addition & 1 deletion llvm/include/llvm-c/IRReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern "C" {
* Read LLVM IR from a memory buffer and convert it into an in-memory Module
* object. Returns 0 on success.
* Optionally returns a human-readable description of any errors that
* occured during parsing IR. OutMessage must be disposed with
* occurred during parsing IR. OutMessage must be disposed with
* LLVMDisposeMessage.
*
* @see llvm::ParseIR()
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace llvm {

/// The standard DAG builder does not normally include terminators as DAG
/// nodes because it does not create the necessary dependencies to prevent
/// reordering. A specialized scheduler can overide
/// reordering. A specialized scheduler can override
/// TargetInstrInfo::isSchedulingBoundary then enable this flag to indicate
/// it has taken responsibility for scheduling the terminator correctly.
bool CanHandleTerminators;
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/TargetSchedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class TargetSchedModel {
/// model.
///
/// Compute and return the expected latency of this instruction independent of
/// a particular use. computeOperandLatency is the prefered API, but this is
/// a particular use. computeOperandLatency is the preferred API, but this is
/// occasionally useful to help estimate instruction cost.
///
/// If UseDefaultDefLatency is false and no new machine sched model is
Expand Down
10 changes: 5 additions & 5 deletions llvm/include/llvm/Support/Compression.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ enum CompressionLevel {

enum Status {
StatusOK,
StatusUnsupported, // zlib is unavaliable
StatusOutOfMemory, // there was not enough memory
StatusBufferTooShort, // there was not enough room in the output buffer
StatusInvalidArg, // invalid input parameter
StatusInvalidData // data was corrupted or incomplete
StatusUnsupported, // zlib is unavailable
StatusOutOfMemory, // there was not enough memory
StatusBufferTooShort, // there was not enough room in the output buffer
StatusInvalidArg, // invalid input parameter
StatusInvalidData // data was corrupted or incomplete
};

bool isAvailable();
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Support/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace sys {
/// memory was not allocated using the allocateMappedMemory method.
/// \p Block describes the memory block to be protected.
/// \p Flags specifies the new protection state to be assigned to the block.
/// \p ErrMsg [out] returns a string describing any error that occured.
/// \p ErrMsg [out] returns a string describing any error that occurred.
///
/// If \p Flags is MF_WRITE, the actual behavior varies
/// with the operating system (i.e. MF_READ | MF_WRITE on Windows) and the
Expand Down
2 changes: 1 addition & 1 deletion llvm/include/llvm/Transforms/Utils/ASanStackFrameLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
// This header defines ComputeASanStackFrameLayout and auxilary data structs.
// This header defines ComputeASanStackFrameLayout and auxiliary data structs.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_UTILS_ASANSTACKFRAMELAYOUT_H
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Analysis/BasicAliasAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static bool isObjectSize(const Value *V, uint64_t Size,
/// isIdentifiedFunctionLocal - Return true if V is umabigously identified
/// at the function-level. Different IdentifiedFunctionLocals can't alias.
/// Further, an IdentifiedFunctionLocal can not alias with any function
/// arguments other than itself, which is not neccessarily true for
/// arguments other than itself, which is not necessarily true for
/// IdentifiedObjects.
static bool isIdentifiedFunctionLocal(const Value *V)
{
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Analysis/DependenceAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3178,7 +3178,7 @@ void DependenceAnalysis::updateDirection(Dependence::DVEntry &Level,

/// Check if we can delinearize the subscripts. If the SCEVs representing the
/// source and destination array references are recurrences on a nested loop,
/// this function flattens the nested recurrences into seperate recurrences
/// this function flattens the nested recurrences into separate recurrences
/// for each loop level.
bool
DependenceAnalysis::tryDelinearize(const SCEV *SrcSCEV, const SCEV *DstSCEV,
Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/Analysis/ScalarEvolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7143,7 +7143,7 @@ SCEVAddRecExpr::delinearize(ScalarEvolution &SE,
const SCEV *Start = this->getStart();
const SCEV *Step = this->getStepRecurrence(SE);

// Build the SCEV representation of the cannonical induction variable in the
// Build the SCEV representation of the canonical induction variable in the
// loop of this SCEV.
const SCEV *Zero = SE.getConstant(this->getType(), 0);
const SCEV *One = SE.getConstant(this->getType(), 1);
Expand Down Expand Up @@ -7189,13 +7189,13 @@ SCEVAddRecExpr::delinearize(ScalarEvolution &SE,
else
Rem = Quotient;

// Scale up the cannonical induction variable IV by whatever remains from the
// Scale up the canonical induction variable IV by whatever remains from the
// Step after division by the GCD: the GCD is the size of all the sub-array.
if (Step != GCD) {
Step = SCEVDivision::divide(SE, Step, GCD);
IV = SE.getMulExpr(IV, Step);
}
// The access function in the current subscript is computed as the cannonical
// The access function in the current subscript is computed as the canonical
// induction variable IV (potentially scaled up by the step) and offset by
// Rem, the offset of delinearization in the sub-array.
const SCEV *Index = SE.getAddExpr(IV, Rem);
Expand Down Expand Up @@ -7652,7 +7652,7 @@ void ScalarEvolution::forgetMemoizedResults(const SCEV *S) {

typedef DenseMap<const Loop *, std::string> VerifyMap;

/// replaceSubString - Replaces all occurences of From in Str with To.
/// replaceSubString - Replaces all occurrences of From in Str with To.
static void replaceSubString(std::string &Str, StringRef From, StringRef To) {
size_t Pos = 0;
while ((Pos = Str.find(From, Pos)) != std::string::npos) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ BreakAntiDependencies(const std::vector<SUnit>& SUnits,
if (RC == reinterpret_cast<TargetRegisterClass *>(-1))
AntiDepReg = 0;

// Look for a suitable register to use to break the anti-depenence.
// Look for a suitable register to use to break the anti-dependence.
//
// TODO: Instead of picking the first free register, consider which might
// be the best.
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/MachineScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1976,7 +1976,7 @@ void SchedBoundary::bumpNode(SUnit *SU) {
}
else {
// After updating ZoneCritResIdx and ExpectedLatency, check if we're
// resource limited. If a stall occured, bumpCycle does this.
// resource limited. If a stall occurred, bumpCycle does this.
unsigned LFactor = SchedModel->getLatencyFactor();
IsResourceLimited =
(int)(getCriticalCount() - (getScheduledLatency() * LFactor))
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/ScheduleDAG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const MCInstrDesc *ScheduleDAG::getNodeDesc(const SDNode *Node) const {
/// not already. It also adds the current node as a successor of the
/// specified node.
bool SUnit::addPred(const SDep &D, bool Required) {
// If this node already has this depenence, don't add a redundant one.
// If this node already has this dependence, don't add a redundant one.
for (SmallVectorImpl<SDep>::iterator I = Preds.begin(), E = Preds.end();
I != E; ++I) {
// Zero-latency weak edges may be added purely for heuristic ordering. Don't
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6740,7 +6740,7 @@ SDValue DAGCombiner::visitSINT_TO_FP(SDNode *N) {
return DAG.getNode(ISD::UINT_TO_FP, SDLoc(N), VT, N0);
}

// The next optimizations are desireable only if SELECT_CC can be lowered.
// The next optimizations are desirable only if SELECT_CC can be lowered.
// Check against MVT::Other for SELECT_CC, which is a workaround for targets
// having to say they don't support SELECT_CC on every type the DAG knows
// about, since there is no way to mark an opcode illegal at all value types
Expand Down Expand Up @@ -6797,7 +6797,7 @@ SDValue DAGCombiner::visitUINT_TO_FP(SDNode *N) {
return DAG.getNode(ISD::SINT_TO_FP, SDLoc(N), VT, N0);
}

// The next optimizations are desireable only if SELECT_CC can be lowered.
// The next optimizations are desirable only if SELECT_CC can be lowered.
// Check against MVT::Other for SELECT_CC, which is a workaround for targets
// having to say they don't support SELECT_CC on every type the DAG knows
// about, since there is no way to mark an opcode illegal at all value types
Expand Down Expand Up @@ -8265,7 +8265,7 @@ bool DAGCombiner::SliceUpLoad(SDNode *N) {
// The width of the type must be a power of 2 and greater than 8-bits.
// Otherwise the load cannot be represented in LLVM IR.
// Moreover, if we shifted with a non-8-bits multiple, the slice
// will be accross several bytes. We do not support that.
// will be across several bytes. We do not support that.
unsigned Width = User->getValueSizeInBits(0);
if (Width < 8 || !isPowerOf2_32(Width) || (Shift & 0x7))
return 0;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/StackMaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PatchPointOpers::PatchPointOpers(const MachineInstr *MI)
++CheckStartIdx;

assert(getMetaIdx() == CheckStartIdx &&
"Unexpected additonal definition in Patchpoint intrinsic.");
"Unexpected additional definition in Patchpoint intrinsic.");
#endif
}

Expand Down
14 changes: 7 additions & 7 deletions llvm/lib/ExecutionEngine/IntelJITEvents/jitprofiling.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ typedef struct _iJIT_Method_NIDS

typedef struct _LineNumberInfo
{
/* x86 Offset from the begining of the method*/
unsigned int Offset;
/* source line number from the begining of the source file */
/* x86 Offset from the beginning of the method*/
unsigned int Offset;

/* source line number from the beginning of the source file */
unsigned int LineNumber;

} *pLineNumberInfo, LineNumberInfo;
Expand All @@ -191,9 +191,9 @@ typedef struct _iJIT_Method_Load
unsigned int method_size;

/* Line Table size in number of entries - Zero if none */
unsigned int line_number_size;
/* Pointer to the begining of the line numbers info array */
unsigned int line_number_size;

/* Pointer to the beginning of the line numbers info array */
pLineNumberInfo line_number_table;

/* unique class ID */
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ void Interpreter::visitCallSite(CallSite CS) {
callFunction((Function*)GVTOP(SRC), ArgVals);
}

// auxilary function for shift operations
// auxiliary function for shift operations
static unsigned getShiftAmount(uint64_t orgShiftAmount,
llvm::APInt valueToShift) {
unsigned valueWidth = valueToShift.getBitWidth();
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ExecutionEngine/MCJIT/SectionMemoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ uint8_t *SectionMemoryManager::allocateSection(MemoryGroup &MemGroup,
sys::Memory::MF_WRITE,
ec);
if (ec) {
// FIXME: Add error propogation to the interface.
// FIXME: Add error propagation to the interface.
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class RuntimeDyldELF : public RuntimeDyldImpl {

virtual void updateGOTEntries(StringRef Name, uint64_t Addr);

// Relocation entries for symbols whose position-independant offset is
// Relocation entries for symbols whose position-independent offset is
// updated in a global offset table.
typedef SmallVector<RelocationValueRef, 2> GOTRelocations;
GOTRelocations GOTEntries; // List of entries requiring finalization.
Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/MC/MCParser/AsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ bool AsmParser::parseStatement(ParseStatementInfo &Info) {
if (!getTargetParser().ParseDirective(ID))
return false;

// Next, check the extention directive map to see if any extension has
// Next, check the extension directive map to see if any extension has
// registered itself to parse this directive.
std::pair<MCAsmParserExtension *, DirectiveHandler> Handler =
ExtensionDirectiveMap.lookup(IDVal);
Expand Down Expand Up @@ -3164,13 +3164,13 @@ bool AsmParser::parseDirectiveMacro(SMLoc DirectiveLoc) {
///
/// With the support added for named parameters there may be code out there that
/// is transitioning from positional parameters. In versions of gas that did
/// not support named parameters they would be ignored on the macro defintion.
/// not support named parameters they would be ignored on the macro definition.
/// But to support both styles of parameters this is not possible so if a macro
/// defintion has named parameters but does not use them and has what appears
/// definition has named parameters but does not use them and has what appears
/// to be positional parameters, strings like $1, $2, ... and $n, then issue a
/// warning that the positional parameter found in body which have no effect.
/// Hoping the developer will either remove the named parameters from the macro
/// definiton so the positional parameters get used if that was what was
/// definition so the positional parameters get used if that was what was
/// intended or change the macro to use the named parameters. It is possible
/// this warning will trigger when the none of the named parameters are used
/// and the strings like $1 are infact to simply to be passed trough unchanged.
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Support/APFloat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3776,7 +3776,7 @@ APFloat::opStatus APFloat::next(bool nextDown) {
// change the payload.
if (isSignaling()) {
result = opInvalidOp;
// For consistency, propogate the sign of the sNaN to the qNaN.
// For consistency, propagate the sign of the sNaN to the qNaN.
makeNaN(false, isNegative(), 0);
}
break;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Support/APInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ APInt APInt::ashr(unsigned shiftAmt) const {
// to include in this word.
val[breakWord] = pVal[breakWord+offset] >> wordShift;

// Deal with sign extenstion in the break word, and possibly the word before
// Deal with sign extension in the break word, and possibly the word before
// it.
if (isNegative()) {
if (wordShift > bitsInWord) {
Expand Down
19 changes: 9 additions & 10 deletions llvm/lib/Support/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,11 @@ static Option *LookupNearestOption(StringRef Arg,
return Best;
}

/// CommaSeparateAndAddOccurence - A wrapper around Handler->addOccurence() that
/// does special handling of cl::CommaSeparated options.
static bool CommaSeparateAndAddOccurence(Option *Handler, unsigned pos,
StringRef ArgName,
StringRef Value, bool MultiArg = false)
{
/// CommaSeparateAndAddOccurrence - A wrapper around Handler->addOccurrence()
/// that does special handling of cl::CommaSeparated options.
static bool CommaSeparateAndAddOccurrence(Option *Handler, unsigned pos,
StringRef ArgName, StringRef Value,
bool MultiArg = false) {
// Check to see if this option accepts a comma separated list of values. If
// it does, we have to split up the value into multiple values.
if (Handler->getMiscFlags() & CommaSeparated) {
Expand Down Expand Up @@ -312,13 +311,13 @@ static inline bool ProvideOption(Option *Handler, StringRef ArgName,

// If this isn't a multi-arg option, just run the handler.
if (NumAdditionalVals == 0)
return CommaSeparateAndAddOccurence(Handler, i, ArgName, Value);
return CommaSeparateAndAddOccurrence(Handler, i, ArgName, Value);

// If it is, run the handle several times.
bool MultiArg = false;

if (Value.data()) {
if (CommaSeparateAndAddOccurence(Handler, i, ArgName, Value, MultiArg))
if (CommaSeparateAndAddOccurrence(Handler, i, ArgName, Value, MultiArg))
return true;
--NumAdditionalVals;
MultiArg = true;
Expand All @@ -329,7 +328,7 @@ static inline bool ProvideOption(Option *Handler, StringRef ArgName,
return Handler->error("not enough values!");
Value = argv[++i];

if (CommaSeparateAndAddOccurence(Handler, i, ArgName, Value, MultiArg))
if (CommaSeparateAndAddOccurrence(Handler, i, ArgName, Value, MultiArg))
return true;
MultiArg = true;
--NumAdditionalVals;
Expand Down Expand Up @@ -1502,7 +1501,7 @@ class CategorizedHelpPrinter : public HelpPrinter {
std::vector<OptionCategory *> SortedCategories;
std::map<OptionCategory *, std::vector<Option *> > CategorizedOptions;

// Collect registered option categories into vector in preperation for
// Collect registered option categories into vector in preparation for
// sorting.
for (OptionCatSet::const_iterator I = RegisteredOptionCategories->begin(),
E = RegisteredOptionCategories->end();
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/Support/Path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ namespace {

#ifdef LLVM_ON_WIN32
const char *separators = "\\/";
const char prefered_separator = '\\';
const char preferred_separator = '\\';
#else
const char separators = '/';
const char prefered_separator = '/';
const char preferred_separator = '/';
#endif

StringRef find_first_component(StringRef path) {
Expand Down Expand Up @@ -403,7 +403,7 @@ void append(SmallVectorImpl<char> &path, const Twine &a,

if (!component_has_sep && !(path.empty() || is_root_name)) {
// Add a separator.
path.push_back(prefered_separator);
path.push_back(preferred_separator);
}

path.append(i->begin(), i->end());
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/Support/regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,10 @@ p_simp_re(struct parse *p,
sopno subno;
# define BACKSL (1<<CHAR_BIT)

pos = HERE(); /* repetion op, if any, covers from here */
pos = HERE(); /* repetition op, if any, covers from here */

assert(MORE()); /* caller should have ensured this */
c = GETNEXT();
assert(MORE()); /* caller should have ensured this */
c = GETNEXT();
if (c == '\\') {
REQUIRE(MORE(), REG_EESCAPE);
c = BACKSL | GETNEXT();
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@ void AArch64InstrInfo::getAddressConstraints(const MachineInstr &MI,
int &AccessScale, int &MinOffset,
int &MaxOffset) const {
switch (MI.getOpcode()) {
default: llvm_unreachable("Unkown load/store kind");
default:
llvm_unreachable("Unknown load/store kind");
case TargetOpcode::DBG_VALUE:
AccessScale = 1;
MinOffset = INT_MIN;
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/AArch64/AArch64InstrNEON.td
Original file line number Diff line number Diff line change
Expand Up @@ -6432,7 +6432,7 @@ defm TBL2 : NI_TBL_pat<0b01, 0b0, "tbl", "VPair">;
defm TBL3 : NI_TBL_pat<0b10, 0b0, "tbl", "VTriple">;
defm TBL4 : NI_TBL_pat<0b11, 0b0, "tbl", "VQuad">;

// Table lookup extention
// Table lookup extension
class NI_TBX<bit q, bits<2> op2, bits<2> len, bit op,
string asmop, string OpS, RegisterOperand OpVPR,
RegisterOperand VecList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ static DecodeStatus DecodeVLDSTLanePostInstruction(MCInst &Inst, unsigned Insn,
unsigned Q = fieldFromInstruction(Insn, 30, 1);
unsigned S = fieldFromInstruction(Insn, 10, 3);
unsigned lane = 0;
// Calculate the number of lanes by number of vectors and transfered bytes.
// Calculate the number of lanes by number of vectors and transferred bytes.
// NumLanes = 16 bytes / bytes of each lane
unsigned NumLanes = 16 / (TransferBytes / NumVecs);
switch (NumLanes) {
Expand Down
Loading

0 comments on commit cb40291

Please sign in to comment.