Displaying 20 results from an estimated 40 matches for "mycpu".
Did you mean:
mcpu
2015 Apr 16
2
[LLVMdev] CPU information in the LLVMTargetMachine constructor
...d like to use the "-mcpu" to choose the architecture of which I want to compile the code.
Does it seem right?
But at the moment I cannot manage to have the CPU information in my "LLVMTargetMachine" constructor.
I have it when I go through llc:
clang -emit-llvm ...
llc -mcpu=mycpu ...
But not when I go directly from clang
clang -mcpu=mycpu
What should I do to have this information in the constructor using only the clang command?
Best Regards,
Romaric
2019 Mar 26
2
Generating object files more efficiently
...ct files more efficiently
There's a function in lib/Driver/ToolChains/CommonArgs.cpp called tools::getCPUName that needs to be implemented for each target to determine how to process -mcpu/-march
You might be able to bypass that for testing purposes by adding "-Xclang -target-cpu -Xclang mycpu" to your driver command line.
~Craig
On Mon, Mar 25, 2019 at 11:24 AM Alec Ari via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hi,
XYZ is your actual architecture? Are you trolling?
Alec
_______________________________________________
LLVM D...
2019 Mar 24
2
Generating object files more efficiently
Hi,
XYZ is your actual architecture? Are you trolling?
Alec
2019 Mar 26
2
Generating object files more efficiently
...iles more efficiently
There's a function in lib/Driver/ToolChains/CommonArgs.cpp called tools::getCPUName that needs to be implemented for each target to determine how to process -mcpu/-march
You might be able to bypass that for testing purposes by adding "-Xclang -target-cpu -Xclang mycpu" to your driver command line.
~Craig
On Mon, Mar 25, 2019 at 11:24 AM Alec Ari via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hi,
XYZ is your actual architecture? Are you trolling?
Alec
_______________________________________________
L...
2014 Mar 12
0
[PATCH RFC v6 09/11] pvqspinlock, x86: Add qspinlock para-virtualization support
...be added to the qnode structure
+ */
+#if CONFIG_NR_CPUS >= (1 << 16)
+#define _cpuid_t u32
+#else
+#define _cpuid_t u16
+#endif
+
+struct qnode;
+
+struct pv_qvars {
+ s16 cpustate; /* CPU status flag */
+ _cpuid_t nxtcpu_p1; /* CPU number of next node + 1 */
+ _cpuid_t mycpu; /* CPU number of this node */
+ struct qnode *prev; /* Pointer to previous node */
+};
+
+/**
+ * pv_init_vars - initialize fields in struct pv_qvars
+ * @pv : pointer to struct pv_qvars
+ * @cpu: current CPU number
+ */
+static __always_inline void pv_init_vars(struct pv_qvars *pv, int cpu)
+{...
2014 Oct 16
2
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...Node 3 |
+ * +------------+------------+------------+------------+
+ */
+struct pv_qnode {
+ struct mcs_spinlock mcs; /* MCS node */
+ struct mcs_spinlock __res[3]; /* 3 reserved MCS nodes */
+ s8 cpustate; /* CPU status flag */
+ s8 mayhalt; /* May be halted soon */
+ int mycpu; /* CPU number of this node */
+ struct mcs_spinlock *head; /* Queue head node pointer */
+};
+
+/**
+ * pv_init_node - initialize fields in struct pv_qnode
+ * @node: pointer to struct mcs_spinlock
+ * @cpu : current CPU number
+ */
+static inline void pv_init_node(struct mcs_spinlock *node)
+{
+...
2014 Oct 16
2
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...Node 3 |
+ * +------------+------------+------------+------------+
+ */
+struct pv_qnode {
+ struct mcs_spinlock mcs; /* MCS node */
+ struct mcs_spinlock __res[3]; /* 3 reserved MCS nodes */
+ s8 cpustate; /* CPU status flag */
+ s8 mayhalt; /* May be halted soon */
+ int mycpu; /* CPU number of this node */
+ struct mcs_spinlock *head; /* Queue head node pointer */
+};
+
+/**
+ * pv_init_node - initialize fields in struct pv_qnode
+ * @node: pointer to struct mcs_spinlock
+ * @cpu : current CPU number
+ */
+static inline void pv_init_node(struct mcs_spinlock *node)
+{
+...
2014 Oct 24
3
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...de *pn = (struct pv_qnode *)node;
>> +
>> + BUILD_BUG_ON(sizeof(struct pv_qnode)> 5*sizeof(struct mcs_spinlock));
>> +
>> + if (!pv_enabled())
>> + return;
>> +
>> + pn->cpustate = PV_CPU_ACTIVE;
>> + pn->mayhalt = false;
>> + pn->mycpu = smp_processor_id();
>> + pn->head = PV_INVALID_HEAD;
>> +}
>
>> @@ -333,6 +393,7 @@ queue:
>> node += idx;
>> node->locked = 0;
>> node->next = NULL;
>> + pv_init_node(node);
>>
>> /*
>> * We touched a...
2014 Oct 24
3
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...de *pn = (struct pv_qnode *)node;
>> +
>> + BUILD_BUG_ON(sizeof(struct pv_qnode)> 5*sizeof(struct mcs_spinlock));
>> +
>> + if (!pv_enabled())
>> + return;
>> +
>> + pn->cpustate = PV_CPU_ACTIVE;
>> + pn->mayhalt = false;
>> + pn->mycpu = smp_processor_id();
>> + pn->head = PV_INVALID_HEAD;
>> +}
>
>> @@ -333,6 +393,7 @@ queue:
>> node += idx;
>> node->locked = 0;
>> node->next = NULL;
>> + pv_init_node(node);
>>
>> /*
>> * We touched a...
2014 May 30
0
[PATCH v11 14/16] pvqspinlock: Add qspinlock para-virtualization support
...PV Node 3 |
+ * +------------+------------+------------+------------+
+ */
+struct pv_qnode {
+ struct mcs_spinlock mcs; /* MCS node */
+ struct mcs_spinlock dummy[3]; /* 3 dummy MCS nodes */
+ s8 cpustate; /* CPU status flag */
+ s8 mayhalt; /* May be halted soon */
+ u32 mycpu; /* CPU number of this node */
+ struct pv_qnode *prev; /* Pointer to previous node */
+};
+
+#define qhead mcs.locked /* Queue head flag */
+
+/**
+ * pv_init_vars - initialize fields in struct pv_qnode
+ * @mcs: pointer to struct mcs_spinlock
+ * @cpu: current CPU number
+ */
+static inline...
2014 Mar 13
3
[PATCH RFC v6 09/11] pvqspinlock, x86: Add qspinlock para-virtualization support
On 12/03/14 18:54, Waiman Long wrote:
> This patch adds para-virtualization support to the queue spinlock in
> the same way as was done in the PV ticket lock code. In essence, the
> lock waiters will spin for a specified number of times (QSPIN_THRESHOLD
> = 2^14) and then halted itself. The queue head waiter will spins
> 2*QSPIN_THRESHOLD times before halting itself. When it has
2014 Mar 13
3
[PATCH RFC v6 09/11] pvqspinlock, x86: Add qspinlock para-virtualization support
On 12/03/14 18:54, Waiman Long wrote:
> This patch adds para-virtualization support to the queue spinlock in
> the same way as was done in the PV ticket lock code. In essence, the
> lock waiters will spin for a specified number of times (QSPIN_THRESHOLD
> = 2^14) and then halted itself. The queue head waiter will spins
> 2*QSPIN_THRESHOLD times before halting itself. When it has
2014 Mar 13
0
[PATCH RFC v6 09/11] pvqspinlock, x86: Add qspinlock para-virtualization support
...nk a barrier is missing:
Lock holder ---------------------------------------
// queue_spin_unlock
barrier();
ACCESS_ONCE(qlock->lock) = 0;
barrier();
// pv_kick_node:
if (pv->cpustate != PV_CPU_HALTED)
return;
ACCESS_ONCE(pv->cpustate) = PV_CPU_KICKED;
__queue_kick_cpu(pv->mycpu, PV_KICK_QUEUE_HEAD);
Waiter -------------------------------------------
// pv_head_spin_check
ACCESS_ONCE(pv->cpustate) = PV_CPU_HALTED;
lockval = cmpxchg(&qlock->lock,
_QSPINLOCK_LOCKED,
_QSPINLOCK_LOCKED_SLOWPATH);
if (lockval == 0) {
/*
* Can exit now as...
2014 Oct 24
0
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...*node)
> +{
> + struct pv_qnode *pn = (struct pv_qnode *)node;
> +
> + BUILD_BUG_ON(sizeof(struct pv_qnode) > 5*sizeof(struct mcs_spinlock));
> +
> + if (!pv_enabled())
> + return;
> +
> + pn->cpustate = PV_CPU_ACTIVE;
> + pn->mayhalt = false;
> + pn->mycpu = smp_processor_id();
> + pn->head = PV_INVALID_HEAD;
> +}
> @@ -333,6 +393,7 @@ queue:
> node += idx;
> node->locked = 0;
> node->next = NULL;
> + pv_init_node(node);
>
> /*
> * We touched a (possibly) cold cacheline in the per-cpu queue...
2014 Oct 29
1
[PATCH v13 09/11] pvqspinlock, x86: Add para-virtualization support
...Node 3 |
+ * +------------+------------+------------+------------+
+ */
+struct pv_qnode {
+ struct mcs_spinlock mcs; /* MCS node */
+ struct mcs_spinlock __res[3]; /* 3 reserved MCS nodes */
+ s8 cpustate; /* CPU status flag */
+ s8 mayhalt; /* May be halted soon */
+ int mycpu; /* CPU number of this node */
+ struct mcs_spinlock *head; /* Queue head node pointer */
+};
+
+/**
+ * pv_init_node - initialize fields in struct pv_qnode
+ * @node: pointer to struct mcs_spinlock
+ * @cpu : current CPU number
+ */
+static inline void pv_init_node(struct mcs_spinlock *node)
+{
+...
2014 Oct 29
1
[PATCH v13 09/11] pvqspinlock, x86: Add para-virtualization support
...Node 3 |
+ * +------------+------------+------------+------------+
+ */
+struct pv_qnode {
+ struct mcs_spinlock mcs; /* MCS node */
+ struct mcs_spinlock __res[3]; /* 3 reserved MCS nodes */
+ s8 cpustate; /* CPU status flag */
+ s8 mayhalt; /* May be halted soon */
+ int mycpu; /* CPU number of this node */
+ struct mcs_spinlock *head; /* Queue head node pointer */
+};
+
+/**
+ * pv_init_node - initialize fields in struct pv_qnode
+ * @node: pointer to struct mcs_spinlock
+ * @cpu : current CPU number
+ */
+static inline void pv_init_node(struct mcs_spinlock *node)
+{
+...
2014 Mar 13
1
[PATCH RFC v6 09/11] pvqspinlock, x86: Add qspinlock para-virtualization support
...queue_spin_unlock_slowpath(lock);
} else {
__queue_spin_unlock(lock);
}
> // pv_kick_node:
> if (pv->cpustate != PV_CPU_HALTED)
> return;
> ACCESS_ONCE(pv->cpustate) = PV_CPU_KICKED;
> __queue_kick_cpu(pv->mycpu, PV_KICK_QUEUE_HEAD);
>
> Waiter -------------------------------------------
>
> // pv_head_spin_check
> ACCESS_ONCE(pv->cpustate) = PV_CPU_HALTED;
> lockval = cmpxchg(&qlock->lock,
> _QSPINLOCK_LOCKED,
>...
2014 Mar 13
1
[PATCH RFC v6 09/11] pvqspinlock, x86: Add qspinlock para-virtualization support
...queue_spin_unlock_slowpath(lock);
} else {
__queue_spin_unlock(lock);
}
> // pv_kick_node:
> if (pv->cpustate != PV_CPU_HALTED)
> return;
> ACCESS_ONCE(pv->cpustate) = PV_CPU_KICKED;
> __queue_kick_cpu(pv->mycpu, PV_KICK_QUEUE_HEAD);
>
> Waiter -------------------------------------------
>
> // pv_head_spin_check
> ACCESS_ONCE(pv->cpustate) = PV_CPU_HALTED;
> lockval = cmpxchg(&qlock->lock,
> _QSPINLOCK_LOCKED,
>...
2014 Oct 27
2
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...+79,6 @@ static inline void pv_init_node(struct mcs_spinlock *node)
BUILD_BUG_ON(sizeof(struct pv_qnode) > 5*sizeof(struct
mcs_spinlock));
- if (!pv_enabled())
- return;
-
pn->cpustate = PV_CPU_ACTIVE;
pn->mayhalt = false;
pn->mycpu = smp_processor_id();
@@ -132,9 +129,6 @@ static inline bool pv_link_and_wait_node(u32 old,
struct mcs
struct pv_qnode *ppn, *pn = (struct pv_qnode *)node;
unsigned int count;
- if (!pv_enabled())
- return false;
-
if (!(old & _Q_TAIL_MASK)) {...
2014 Oct 27
2
[PATCH v12 09/11] pvqspinlock, x86: Add para-virtualization support
...+79,6 @@ static inline void pv_init_node(struct mcs_spinlock *node)
BUILD_BUG_ON(sizeof(struct pv_qnode) > 5*sizeof(struct
mcs_spinlock));
- if (!pv_enabled())
- return;
-
pn->cpustate = PV_CPU_ACTIVE;
pn->mayhalt = false;
pn->mycpu = smp_processor_id();
@@ -132,9 +129,6 @@ static inline bool pv_link_and_wait_node(u32 old,
struct mcs
struct pv_qnode *ppn, *pn = (struct pv_qnode *)node;
unsigned int count;
- if (!pv_enabled())
- return false;
-
if (!(old & _Q_TAIL_MASK)) {...